Fixes for PNaCl build of remoting client plugin with GN.
1. Added support for PNaCl in base. 2. Separated parts of desktop_capture module that need to be compiled for PNaCl. BUG=512899 R=jiayl@chromium.org, jiayl@webrtc.org Review URL: https://codereview.webrtc.org/1323453003 . Cr-Commit-Position: refs/heads/master@{#9836}
This commit is contained in:
@ -635,4 +635,9 @@ static_library("rtc_base") {
|
||||
"linux.h",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_nacl) {
|
||||
deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
|
||||
defines += [ "timezone=_timezone" ]
|
||||
}
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ int64 SystemInfo::GetMemorySize() {
|
||||
int error = sysctlbyname("hw.memsize", &memory, &len, NULL, 0);
|
||||
if (error || memory == 0)
|
||||
memory = -1;
|
||||
#else // WEBRTC_LINUX
|
||||
#elif defined(WEBRTC_LINUX)
|
||||
memory = static_cast<int64>(sysconf(_SC_PHYS_PAGES)) *
|
||||
static_cast<int64>(sysconf(_SC_PAGESIZE));
|
||||
if (memory < 0) {
|
||||
|
@ -12,6 +12,20 @@ import("../../build/webrtc.gni")
|
||||
use_desktop_capture_differ_sse2 =
|
||||
!is_ios && (current_cpu == "x86" || current_cpu == "x64")
|
||||
|
||||
source_set("primitives") {
|
||||
sources = [
|
||||
"desktop_capture_types.h",
|
||||
"desktop_frame.cc",
|
||||
"desktop_frame.h",
|
||||
"desktop_geometry.cc",
|
||||
"desktop_geometry.h",
|
||||
"desktop_region.cc",
|
||||
"desktop_region.h",
|
||||
]
|
||||
|
||||
public_configs = [ "../..:common_inherited_config" ]
|
||||
}
|
||||
|
||||
source_set("desktop_capture") {
|
||||
sources = [
|
||||
"cropped_desktop_frame.cc",
|
||||
@ -23,17 +37,10 @@ source_set("desktop_capture") {
|
||||
"desktop_and_cursor_composer.h",
|
||||
"desktop_capture_options.cc",
|
||||
"desktop_capture_options.h",
|
||||
"desktop_capture_types.h",
|
||||
"desktop_capturer.h",
|
||||
"desktop_capturer.h",
|
||||
"desktop_frame.cc",
|
||||
"desktop_frame.h",
|
||||
"desktop_frame_win.cc",
|
||||
"desktop_frame_win.h",
|
||||
"desktop_geometry.cc",
|
||||
"desktop_geometry.h",
|
||||
"desktop_region.cc",
|
||||
"desktop_region.h",
|
||||
"differ.cc",
|
||||
"differ.h",
|
||||
"differ_block.cc",
|
||||
@ -127,6 +134,7 @@ source_set("desktop_capture") {
|
||||
}
|
||||
|
||||
deps = [
|
||||
":primitives",
|
||||
"../../base:rtc_base_approved",
|
||||
"../../system_wrappers",
|
||||
]
|
||||
|
@ -98,7 +98,7 @@ class DesktopFrame {
|
||||
class BasicDesktopFrame : public DesktopFrame {
|
||||
public:
|
||||
explicit BasicDesktopFrame(DesktopSize size);
|
||||
virtual ~BasicDesktopFrame();
|
||||
~BasicDesktopFrame() override;
|
||||
|
||||
// Creates a BasicDesktopFrame that contains copy of |frame|.
|
||||
static DesktopFrame* CopyOf(const DesktopFrame& frame);
|
||||
@ -114,7 +114,7 @@ class SharedMemoryDesktopFrame : public DesktopFrame {
|
||||
SharedMemoryDesktopFrame(DesktopSize size,
|
||||
int stride,
|
||||
SharedMemory* shared_memory);
|
||||
virtual ~SharedMemoryDesktopFrame();
|
||||
~SharedMemoryDesktopFrame() override;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(SharedMemoryDesktopFrame);
|
||||
|
@ -511,6 +511,8 @@ DesktopRegion::Iterator::Iterator(const DesktopRegion& region)
|
||||
}
|
||||
}
|
||||
|
||||
DesktopRegion::Iterator::~Iterator() {}
|
||||
|
||||
bool DesktopRegion::Iterator::IsAtEnd() const {
|
||||
return row_ == region_.rows_.end();
|
||||
}
|
||||
|
@ -67,6 +67,7 @@ class DesktopRegion {
|
||||
class Iterator {
|
||||
public:
|
||||
explicit Iterator(const DesktopRegion& target);
|
||||
~Iterator();
|
||||
|
||||
bool IsAtEnd() const;
|
||||
void Advance();
|
||||
|
Reference in New Issue
Block a user