Commit Graph

263 Commits

Author SHA1 Message Date
99f7bfde28 Change MANUAL -> DISABLED for ScreenCapturerIntegrationTest tests
It turns out MANUAL_ isn't a part of the supported gtest prefixes: it's a part of the
Chromium test launcher: https://cs.chromium.org/chromium/src/content/public/test/test_launcher.cc?rcl=0&l=69

Luckily, we can use DISABLED_ for the same purpose, since there's the --gtest_also_run_disabled_tests
flag we can use.

BUG=webrtc:6666, webrtc:6843
TBR=zijiehe@chromium.org

Review-Url: https://codereview.webrtc.org/2568013002 .
Cr-Commit-Position: refs/heads/master@{#15539}
2016-12-12 07:30:09 +00:00
8d1649d71b MANUAL tests of GDI capturers
ScreenCapturerWinGdi randomly returns black frames in test environment. The root
cause is still unknown, so change ScreenCapturerWinGdi tests into MANUAL mode to
execute in test environment, but unblock other developers. We can eventually get
a failure ratio and more samples for debugging.

BUG=webrtc:6666, webrtc:6843

Review-Url: https://codereview.webrtc.org/2564173002
Cr-Commit-Position: refs/heads/master@{#15518}
2016-12-10 00:00:10 +00:00
e83f4b3835 Enable screen capturer tests for Linux / DirectX capturer / magnifier capturer
GDI capturer may randomly return a blank frame. So this change enables tests for
Linux / DirectX capturer / magnifier capturer.

BUG=webrtc:6666

Review-Url: https://codereview.webrtc.org/2559583002
Cr-Commit-Position: refs/heads/master@{#15489}
2016-12-08 19:47:09 +00:00
2cd872a939 Log BitBlt failure
BitBlt returns a BOOL value, which should be taken care in ScreenCapturerWinGdi.
Meanwhile, this change also replaces assert() / abort() with RTC_DCHECK() /
RTC_CHECK() / RTC_NOTREACHED().

This change cannot fix the bug, the reason of the issue is still unknown, but it
is still the right thing to do.

In ScreenCapturerIntegrationTest, each frame will be captured at most 600 times.
Since the test case fails, which means the ScreenCapturerWinGdi consistently
returns a white frame for 600 times under a certain state. With this change,
instead of returning white frame, ScreenCapturerWinGdi will return a temporary
error. But I do not think a ScreenCapturerWinGdi can automatically recover by
retrying.

BUG=webrtc:6843

Review-Url: https://codereview.webrtc.org/2553353002
Cr-Commit-Position: refs/heads/master@{#15465}
2016-12-07 20:40:34 +00:00
d3de4abb50 Remove deprecated comments
A trivial change to remove a deprecated comment.

BUG=chromium:314516

Review-Url: https://codereview.webrtc.org/2553283002
Cr-Commit-Position: refs/heads/master@{#15454}
2016-12-07 00:32:12 +00:00
f4a5942e62 Disabled all ScreenCapturerIntegrationTests on Windows
TBR=zijiehe@chromium.org
BUG=webrtc:6666

Review-Url: https://codereview.webrtc.org/2538093002
Cr-Commit-Position: refs/heads/master@{#15321}
2016-11-30 10:39:00 +00:00
e61fbfffda Use RotateDesktopFrame in DirectX capturer
To support rotation in DirectX capturer, several other changes are also
required.
1. Removing AddRect in RotateDesktopFrame, this is a performance improvement.
DxgiOutputDuplicator creates a rotated DesktopRegion, which can be directly
add to updated_region.
2. DxgiOutputDuplicator::SourceRect() is not accurate, the rectangle in source
is controlled by |offset| or |rotation_| + |offset|, instead of desktop_rect().
3. The |region| in DxgiTexture::CopyFrom() is not accurate. It needs an
unrotated DesktopRegion which offsets by |offset| instead of desktop_rect(). To
avoid generating both rotated and unrotated updated_region, this parameter has
been removed. This impacts DxgiTextureStagning performance a little bit (1.5ms).
Refer to bug for details.

BUG=webrtc:6646

Review-Url: https://codereview.webrtc.org/2530303002
Cr-Commit-Position: refs/heads/master@{#15308}
2016-11-30 00:09:57 +00:00
166e59a70f Enable ScreenCapturerIntegrationTests
This change enables ScreenCapturerIntegrationTests.

BUG=webrtc:6666

Review-Url: https://codereview.webrtc.org/2513213002
Cr-Commit-Position: refs/heads/master@{#15307}
2016-11-29 22:46:56 +00:00
b890c95c33 Replace some asserts with DCHECKs
NOPRESUBMIT=true
BUG=webrtc:6779

Review-Url: https://codereview.webrtc.org/2535643002
Cr-Commit-Position: refs/heads/master@{#15295}
2016-11-29 13:30:47 +00:00
90ea7362fc Add DesktopFrame rotation functions
This change adds RotateDesktopFrame(), RotateRect(), RotateSize(),
ReverseRotate() functions, so an implementation can use these free functions to
rotate and copy pixels from one DesktopFrame to another at the same time.

This is the first part of the change to support rotation in DirectX capturer. In
a coming change, these functions will be used in DxgiOutputDuplicator to do the
rotation and copying.

Background,
DirectX APIs always return unrotated data buffer, so we need to rotate it to
match the user-selected rotation. What worse is except for the data buffer,
other variables return by these APIs are all rotated, e.g. output size, monitor
position. So we will eventually not be able to capture the rotated monitors,
because we cannot set their position and size correctly. Though
DXGI_OUTDUPL_DESC provides a DXGI_MODE_ROTATION enumeration to indicate the
output rotation, it does not provide a simple way to rotate an IDXGIResource,
which is the only thing we can get from duplication APIs. A typical user case
here is to use a matrix to transform the IDXGIResource and render it to a
surface. But since we do not render the IDXGIResource at all, we need to
manually rotate it.

BUG=314516

Review-Url: https://codereview.webrtc.org/2500883004
Cr-Commit-Position: refs/heads/master@{#15205}
2016-11-23 01:17:19 +00:00
1c062bf0af Fix module/desktop_capture compilation on iOS
modules/desktop_capture was failing to compile on iOS because some
files were not compiled.

BUG=667898
R=nicholss@chromium.org

Review URL: https://codereview.webrtc.org/2522083002 .

Cr-Commit-Position: refs/heads/master@{#15203}
2016-11-23 00:07:23 +00:00
1b0e3aa440 Remove deprecated CroppingWindowCapturer::Create
BUG=webrtc:6513

Review-Url: https://codereview.webrtc.org/2513103003
Cr-Commit-Position: refs/heads/master@{#15173}
2016-11-21 21:54:30 +00:00
2184155782 Add more logging in ScreenCapturerIntegrationTest
ScreenCapturerIntegrationTest is flaky on Windows systems due to some unknown
reason. But it's do easily impacted by the environment, so this change adds more
logging (entire screenshot) to help debugging.
Meanwhile, this change also includes a nice-to-have change in ScreenDrawerWin to
always bring the window to front in each WaitForPendingDraws() function call. I
cannot quite tell whether this change can help to resolve the issue, but it is
worth trying.

BUG=webrtc:6666

Review-Url: https://codereview.webrtc.org/2492723002
Cr-Commit-Position: refs/heads/master@{#15158}
2016-11-19 04:31:10 +00:00
b4af3d673a Remove all references to GYP
Remove all .gyp and .gypi files.
Remove entries from OWNERS files for *.isolate, *.gyp, *.gypi
Remove unused scripts in webrtc/build.

BUG=webrtc:6323
R=henrika@webrtc.org, phoglund@webrtc.org

Review URL: https://codereview.webrtc.org/2509703002 .

Cr-Commit-Position: refs/heads/master@{#15107}
2016-11-16 19:11:38 +00:00
2a3eb9f367 mac: Fix screen capture on secondary displays.
The old API CGScreenRegisterMoveCallback returned update rects in desktop
coordinates [secondary display has an origin != 0,0]. The new CGDisplayStream
API returns update rects in display coordinates [origin == 0,0]. Translating the
update rect based on the display's position on the desktop is now incorrect.

BUG=webrtc:6702

Review-Url: https://codereview.webrtc.org/2496413002
Cr-Commit-Position: refs/heads/master@{#15092}
2016-11-15 18:24:53 +00:00
8bc9326a0b DirectX capturer flickers on the second monitor
In DxgiOutputDuplicator, we need to convert between a monitor based coordinate
and a entire screen based coordinate. i.e. Copying an updated area from a
monitor (an output in DirectX API) to the entire screen frame (DesktopFrame).
But DxgiOutputDuplicator always assumes the coordinate is based on screen frame.
So we only need to convert a rectange in updated_region to monitor based
coordinate when copying data from texture_. But in last_frame_, the data are
always based on screen coordinate.

So fixes are both required in line 167 and line 180. In the previous one, we do
not need to convert the DesktopRect, which is already screen based, into screen
based coordinate. In the late one, we do not need to convert the DesktopRect at
all. So after these two changes, DxgiOutputDuplicator::TargetRect() function can
be removed.

Flickers of DirectX capturer can happen on any devices, but a virtual machine
can easily reproduce it. While on a regular high performance machine, it's
harder, but not totally impossible, to reproduce the issue.

BUG=314516

Review-Url: https://codereview.webrtc.org/2495143002
Cr-Commit-Position: refs/heads/master@{#15075}
2016-11-15 02:20:41 +00:00
69a0e3edea Use a default mouse cursor if XFixes is not supported.
BUG=chromium:428886

Review-Url: https://codereview.webrtc.org/2493413002
Cr-Commit-Position: refs/heads/master@{#15074}
2016-11-15 02:04:38 +00:00
372719b577 Remove screen_capturer_mock_objects.h
This is a trivial change to remove MockScreenCapturerCallback, and use
MockDesktopCapturerCallback to replace it.

BUG=webrtc:6513

Review-Url: https://codereview.webrtc.org/2494013003
Cr-Commit-Position: refs/heads/master@{#15047}
2016-11-12 01:18:39 +00:00
3074096816 Crash in DirectX capturer
A tiny but critical change to avoid a crash failure in DirectX capturer.
A good news is this failure is caught by ScreenCapturer integration tests.

BUG=314516

Review-Url: https://codereview.webrtc.org/2494893002
Cr-Commit-Position: refs/heads/master@{#15046}
2016-11-12 00:54:22 +00:00
c9a6e4a67e CroppingWindowCapturer::CreateCapturer() function to replace raw pointer version
The old CroppingWindowCapturer::Create() function returns a raw pointer, which
cannot explain the ownership.
So this change adds a CreateCapturer() function to return a unique_ptr.

BUG=webrtc:6513

Review-Url: https://codereview.webrtc.org/2496993003
Cr-Commit-Position: refs/heads/master@{#15045}
2016-11-11 23:13:39 +00:00
98903d2f5e Remove ScreenCapturer and WindowCapturer
This change removes ScreenCapturer and WindowCapturer from WebRTC.

BUG=webrtc:6513

Review-Url: https://codereview.webrtc.org/2490063002
Cr-Commit-Position: refs/heads/master@{#15033}
2016-11-11 05:57:19 +00:00
3045589e5f Remove references of ScreenCapturer and WindowCapturer
This change removes references of ScreenCapturer and WindowCapturer from WebRTC.
So after this change, ScreenCapturer and WindowCapturer classes can be entirely
removed.

BUG=webrtc:6513

Review-Url: https://codereview.webrtc.org/2489943004
Cr-Commit-Position: refs/heads/master@{#15006}
2016-11-10 00:37:57 +00:00
e083909f85 Remove evil defines out of shared_x_display.h
This is a trivial but dangerous change to remove X11/Xlib.h out of
shared_x_display.h. Since we do not have a strict and automatically
Include-What-You-Use rule, I cannot quite tell whether any Chromium source files
wrongly assume X11/Xlib.h will be included through shared_x_display.h. We can
fix the breaks in Chromium after this change has been failed to integrate to
Chromium.

BUG=webrtc:6513

Review-Url: https://codereview.webrtc.org/2482963003
Cr-Commit-Position: refs/heads/master@{#14987}
2016-11-08 20:47:19 +00:00
556f49d6b6 Remove the requirement of D3D_FEATURE_LEVEL_11_0, but export the D3D_FEATURE_LEVEL through APIs
D3D_FEATURE_LEVEL_11_0 is not offically documented on MSDN to be a requirement
of DXGI duplicator APIs. So instead of using D3D_FEATURE_LEVEL_11_0 as a
requirement in D3dDevice::Initialize(), this change adds a
ScreenCapturerWinDirectx::SupportedFeatureLevel() function to retrieves minimum
and maximium for further reference (in HostTraits to control the experiment).

BUG=314516

Review-Url: https://codereview.webrtc.org/2468083002
Cr-Commit-Position: refs/heads/master@{#14962}
2016-11-08 02:35:19 +00:00
6f601afcf4 Disable ScreenCapturerIntegrationTests because of flaky
ScreenCapturerIntegrationTests are still flaky on Windows.

BUG=webrtc:6666

TBR=kjellander@webrtc.org

Review-Url: https://codereview.webrtc.org/2486553002
Cr-Commit-Position: refs/heads/master@{#14961}
2016-11-08 00:38:44 +00:00
fce4905987 Implement and use new DesktopCapturer APIs in WebRTC
This change replaces all GetWindowList / GetScreenList with GetScreenList,
SelectWindow / SelectScreen with SelectSource, and BringSelectedWindowToFront
with FocusOnSelectedSource in WebRTC.

BUG=webrtc:6513

Review-Url: https://codereview.webrtc.org/2479553006
Cr-Commit-Position: refs/heads/master@{#14960}
2016-11-07 23:25:22 +00:00
c285012d3f Disable flaky test (ScreenCapturerIntegrationTest.CaptureUpdatedRegion)
NOTRY=true
BUG=webrtc:6666

Review-Url: https://codereview.webrtc.org/2485593002
Cr-Commit-Position: refs/heads/master@{#14946}
2016-11-07 11:50:14 +00:00
54fd57980f Add CreateWindowCapturer() and CreateScreenCapturer() in DesktopCapturer
This change copies ScreenCapturerDifferWrapper to a new
DesktopCapturerDifferWrapper, and adds DesktopCapturer::CreateWindowCapturer and
DesktopCapturer::CreateScreenCapturer functions to replace
WindowCapturer::Create and ScreenCapturer::Create.

BUG=webrtc:6513

Committed: https://crrev.com/b763e39beba92b45baa09542f949daabbe6258a3
Review-Url: https://codereview.webrtc.org/2468753002
Cr-Original-Commit-Position: refs/heads/master@{#14880}
Cr-Commit-Position: refs/heads/master@{#14903}
2016-11-02 21:49:38 +00:00
4d0ec05323 Revert of Add CreateWindowCapturer() and CreateScreenCapturer() in DesktopCapturer (patchset #2 id:40001 of https://codereview.webrtc.org/2468753002/ )
Reason for revert:
Prevents WebRTC rolls into Chrome.

https://build.chromium.org/p/chromium.linux/builders/Blimp%20Linux%20%28dbg%29/builds/14848/steps/compile/logs/stdio

The reason for reverting is: Breaks
https://build.chromium.org/p/chromium.linux/builders/Blimp%20Linux%20%28dbg%2...
[881/894] SOLINK ./libcontent.so
FAILED: libcontent.so libcontent.so.TOC
../../third_party/webrtc/modules/desktop_capture/desktop_capturer.cc:45: error:
undefined reference to
'webrtc::DesktopCapturer::CreateRawWindowCapturer(webrtc::DesktopCaptureOptions
const&)'
../../third_party/webrtc/modules/desktop_capture/desktop_capturer.cc:56: error:
undefined reference to
'webrtc::DesktopCapturer::CreateRawScreenCapturer(webrtc::DesktopCaptureOptions
const&)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Original issue's description:
> Add CreateWindowCapturer() and CreateScreenCapturer() in DesktopCapturer
>
> This change copies ScreenCapturerDifferWrapper to a new
> DesktopCapturerDifferWrapper, and adds DesktopCapturer::CreateWindowCapturer and
> DesktopCapturer::CreateScreenCapturer functions to replace
> WindowCapturer::Create and ScreenCapturer::Create.
>
> BUG=webrtc:6513
>
> Committed: https://crrev.com/b763e39beba92b45baa09542f949daabbe6258a3
> Cr-Commit-Position: refs/heads/master@{#14880}

TBR=sergeyu@chromium.org,zijiehe@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6513

Review-Url: https://codereview.webrtc.org/2471773002
Cr-Commit-Position: refs/heads/master@{#14884}
2016-11-02 10:13:23 +00:00
b763e39beb Add CreateWindowCapturer() and CreateScreenCapturer() in DesktopCapturer
This change copies ScreenCapturerDifferWrapper to a new
DesktopCapturerDifferWrapper, and adds DesktopCapturer::CreateWindowCapturer and
DesktopCapturer::CreateScreenCapturer functions to replace
WindowCapturer::Create and ScreenCapturer::Create.

BUG=webrtc:6513

Review-Url: https://codereview.webrtc.org/2468753002
Cr-Commit-Position: refs/heads/master@{#14880}
2016-11-01 23:02:51 +00:00
b68d655f36 Add DesktopCapturer GetSourceList SelectSource FocusOnSelectedSource functions
I have chosen part of 2435603010 changes to compose this change.
According to the discussion we have made in previous change, this CL contains,
1. Source structure to represent a source of a DesktopCapturer.
2. GetSourceList / SelectSource / FocusOnSelectedSource functions in
DesktopCapturer.
3. ScreenCapturer and WindowCapturer forward corresponding functions to the new
DesktopCapturer APIs.

After this change, We can remove WindowCapturer & ScreenCapturer references from
Chromium, and use the new APIs.

BUG=webrtc:6513

Committed: https://crrev.com/9cb0b3b4ac916cdf52d97a63d923dfbe73f0541e
Review-Url: https://codereview.webrtc.org/2452263003
Cr-Original-Commit-Position: refs/heads/master@{#14830}
Cr-Commit-Position: refs/heads/master@{#14832}
2016-10-29 00:35:16 +00:00
fcab7d62d5 Revert of Add DesktopCapturer GetSourceList SelectSource FocusOnSelectedSource functions (patchset #3 id:120001 of https://codereview.chromium.org/2452263003/ )
Reason for revert:
Build break in Chromium

Original issue's description:
> Add DesktopCapturer GetSourceList SelectSource FocusOnSelectedSource functions
>
> I have chosen part of 2435603010 changes to compose this change.
> According to the discussion we have made in previous change, this CL contains,
> 1. Source structure to represent a source of a DesktopCapturer.
> 2. GetSourceList / SelectSource / FocusOnSelectedSource functions in
> DesktopCapturer.
> 3. ScreenCapturer and WindowCapturer forward corresponding functions to the new
> DesktopCapturer APIs.
>
> After this change, We can remove WindowCapturer & ScreenCapturer references from
> Chromium, and use the new APIs.
>
> BUG=webrtc:6513
>
> Committed: https://crrev.com/9cb0b3b4ac916cdf52d97a63d923dfbe73f0541e
> Cr-Commit-Position: refs/heads/master@{#14830}

TBR=sergeyu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6513

Review-Url: https://codereview.webrtc.org/2464553002
Cr-Commit-Position: refs/heads/master@{#14831}
2016-10-29 00:14:16 +00:00
9cb0b3b4ac Add DesktopCapturer GetSourceList SelectSource FocusOnSelectedSource functions
I have chosen part of 2435603010 changes to compose this change.
According to the discussion we have made in previous change, this CL contains,
1. Source structure to represent a source of a DesktopCapturer.
2. GetSourceList / SelectSource / FocusOnSelectedSource functions in
DesktopCapturer.
3. ScreenCapturer and WindowCapturer forward corresponding functions to the new
DesktopCapturer APIs.

After this change, We can remove WindowCapturer & ScreenCapturer references from
Chromium, and use the new APIs.

BUG=webrtc:6513

Review-Url: https://codereview.webrtc.org/2452263003
Cr-Commit-Position: refs/heads/master@{#14830}
2016-10-29 00:07:00 +00:00
6be0a657c5 Move ScreenCapturer 'real' tests out of screen_capturer_unittest.cc.
This is a trivial change, I just cutted and pasted part of the code in
screen_capturer_unittest.cc to screen_capturer_integration_test.cc, removed
DISABLED_ prefixes, and updated build file.

BUG=webrtc:6366

Review-Url: https://codereview.webrtc.org/2444583002
Cr-Commit-Position: refs/heads/master@{#14806}
2016-10-27 23:50:43 +00:00
e183121657 Enable clang style plugin in webrtc/modules/desktop_capture
Enabled the plugin and cleaned up all issues it found, mainly virtual
destructors not being marked as override.

BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2436503004
Cr-Commit-Position: refs/heads/master@{#14793}
2016-10-26 20:15:47 +00:00
54b0acb432 Change destruction order to fix potential invalid pointer dereference.
BUG=657226

Review-Url: https://codereview.webrtc.org/2450953002
Cr-Commit-Position: refs/heads/master@{#14792}
2016-10-26 18:10:29 +00:00
4a18f16c62 Update XServerPixelBuffer to handle errors returned from XGetImage().
XGetImage() may return NULL and XServerPixelBuffer wasn't handling this
case properly.

BUG=649487

Review-Url: https://codereview.webrtc.org/2446733003
Cr-Commit-Position: refs/heads/master@{#14754}
2016-10-24 22:45:53 +00:00
84fbf9ee38 SUCCEEDED macro is misused
SUCCEEDED macro is designed for HRESULT instead of BOOL.
This change exposes my lack of knowledge of native Windows APIs. :(

BUG=https://bugs.chromium.org/p/chromium/issues/detail?id=647067

Review-Url: https://codereview.webrtc.org/2440563003
Cr-Commit-Position: refs/heads/master@{#14716}
2016-10-21 00:00:40 +00:00
bdb8df895a BringSelectedWindowToFront should bring the window to front instead of only focusing it
The API is misused, please refer to the bug for detail explanation.

BUG=https://bugs.chromium.org/p/webrtc/issues/detail?id=6565

Review-Url: https://codereview.webrtc.org/2426423005
Cr-Commit-Position: refs/heads/master@{#14715}
2016-10-20 23:44:22 +00:00
58000a0c3d Move shared_desktop_frame.cc to webrtc/modules/desktop_capture:primitives
Previously shared_desktop_frame.cc wasn't in primitives target, but it
is used in remoting client on android and the client should depend only
on primitives, but not desktop_capture overall.

BUG=653612
R=nicholss@chromium.org

Review URL: https://codereview.webrtc.org/2436913002 .

Cr-Commit-Position: refs/heads/master@{#14709}
2016-10-20 16:34:04 +00:00
0489e498eb Change RefCountedObject to use perfect forwarding.
The main reason for doing this is to allow refcounted objects to accept rvalue references in ctor and be able to std::move ctor rvalue arguments.
Also, refcounted.h is now generated using pump.py instead of manually creating each ctor version.

BUG= none

Review-Url: https://codereview.webrtc.org/2425683003
Cr-Commit-Position: refs/heads/master@{#14687}
2016-10-20 07:24:06 +00:00
79f0bf3ab5 A variable in ScreenCapturerWinDirectx has a bad name
BUG=https://bugs.chromium.org/p/chromium/issues/detail?id=314516

Review-Url: https://codereview.webrtc.org/2440613002
Cr-Commit-Position: refs/heads/master@{#14686}
2016-10-20 06:40:44 +00:00
249beee124 Remove DesktopRegion parameter from DesktopCapturer::Capture
BUG=https://bugs.chromium.org/p/webrtc/issues/detail?id=6513

Review-Url: https://codereview.webrtc.org/2433503002
Cr-Commit-Position: refs/heads/master@{#14676}
2016-10-19 06:13:38 +00:00
6a4607e100 Deflaky ScreenCapturerTest
ScreenCapturer tests may fail on trybot, so this change is to fix the issue.

Changes include,
1. Sometimes, a capturer may capture part of the change, i.e. usually the draw
actions are not atomic. So the updated_region may be inaccurate. So I have added
a MayDrawIncompleteShapes() function in ScreenDrawer. If it returns false, the
updated_region check will be ignored.
2. Several test cases may run concurrently, which makes one ScreenDrawer won't
really work. Its window may be covered by another ScreenDrawer. So I have added
a system wide lock to ensure only one ScreenDrawer is working at a certain time.
3. On unity (Linux), the top several pixels of a window may be covered by a
shadow effect if the window is not focused. So I have added a BringToFront()
function, and call it in WaitForPendingDraws().
4. On Windows, the drawn shapes are 'temporary drawing', which will be erased
once the window is covered by another one. So I repeat DrawRectangle() function
call in the test case.

TODO(zijiehe): The DISABLED_ prefixes will be added back after the code review.
And I will move these test cases into modules_test in a coming change.

BUG=647067

Review-Url: https://codereview.webrtc.org/2337073007
Cr-Commit-Position: refs/heads/master@{#14674}
2016-10-19 01:22:25 +00:00
e40a7ee007 GN: Exclude suppressions of Chromium Clang warnings for Chromium builds.
These suppressions are causing GN errors when Chromium targets are depending
directly on WebRTC targets (needed for https://codereview.chromium.org/2413103004)

BUG=webrtc:4256
NOTRY=True

Review-Url: https://codereview.webrtc.org/2408133008
Cr-Commit-Position: refs/heads/master@{#14644}
2016-10-17 06:56:20 +00:00
91902cb6c0 Remove DesktopRegion parameter from DesktopCapturer::Capture.
To ensure this change won't break Chromium, this is the first change, to add a
new CaptureFrame() function, and let Capture(DesktopRegion) and CaptureFrame()
call each other. So both a legacy consumer or a legacy implementation won't be
broken.

BUG=https://bugs.chromium.org/p/webrtc/issues/detail?id=6513

Review-Url: https://codereview.webrtc.org/2409833002
Cr-Commit-Position: refs/heads/master@{#14635}
2016-10-13 23:47:54 +00:00
73fdc317b2 Several fixes to screen_capturer_mac.
Make sure that the appropriate run loop source gets added/removed. More clean up
to remove unnecessary functions and suppress deprecated declaration warnings.

BUG=webrtc:6029

Review-Url: https://codereview.webrtc.org/2417603002
Cr-Commit-Position: refs/heads/master@{#14615}
2016-10-12 19:24:27 +00:00
440b4be4b7 Use non-deprecated screen update callbacks.
CGRegisterScreenRefreshCallback (and similar) have been replaced by
CGDisplayStream.

Most of the structure is pretty comparable. The main difference is that a
CGDisplayStream needs to be destroyed asynchronously, potentially after
ScreenCapturerMac has been destroyed. This CL creates a self-owned
DisplayStreamManager which will destroy itself once all streams have been
destroyed.

BUG=webrtc:6029

Review-Url: https://codereview.webrtc.org/2391743004
Cr-Commit-Position: refs/heads/master@{#14590}
2016-10-10 22:18:35 +00:00
ac9f876bc0 Sort #includes that got unsorted when gmock.h and gtest.h moved to webrtc/test/
gmock.h and gtest.h were moved (or rather, got wrappers so that we
could put some icky compatibility hacks in one place instead of 500)
in this CL: https://codereview.webrtc.org/2358993004/

NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2381013002
Cr-Commit-Position: refs/heads/master@{#14464}
2016-10-01 05:29:53 +00:00
77eab70470 Enable the -Wundef warning for clang
NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2358993004
Cr-Commit-Position: refs/heads/master@{#14425}
2016-09-29 00:42:08 +00:00