Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1608)

Unified Diff: cc/layers/video_layer_impl_unittest.cc

Issue 1411663002: cc: Split Proxy to eliminate unnecessary dependencies on the impl side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update perf tests. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/video_layer_impl.cc ('k') | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/video_layer_impl_unittest.cc
diff --git a/cc/layers/video_layer_impl_unittest.cc b/cc/layers/video_layer_impl_unittest.cc
index 28ba58acc2d4c38913002ff8adeec09f89f14bc8..f13af9b502471df417031b9f3fbe281d4d91368e 100644
--- a/cc/layers/video_layer_impl_unittest.cc
+++ b/cc/layers/video_layer_impl_unittest.cc
@@ -21,10 +21,11 @@ namespace {
// NOTE: We cannot use DebugScopedSetImplThreadAndMainThreadBlocked in these
// tests because it gets destroyed before the VideoLayerImpl is destroyed. This
// causes a DCHECK in VideoLayerImpl's destructor to fail.
-static void DebugSetImplThreadAndMainThreadBlocked(Proxy* proxy) {
+static void DebugSetImplThreadAndMainThreadBlocked(
+ TaskRunnerProvider* task_runner_provider) {
#if DCHECK_IS_ON()
- proxy->SetCurrentThreadIsImplThread(true);
- proxy->SetMainThreadBlocked(true);
+ task_runner_provider->SetCurrentThreadIsImplThread(true);
+ task_runner_provider->SetMainThreadBlocked(true);
#endif
}
@@ -33,7 +34,7 @@ TEST(VideoLayerImplTest, Occlusion) {
gfx::Size viewport_size(1000, 1000);
LayerTestCommon::LayerImplTest impl;
- DebugSetImplThreadAndMainThreadBlocked(impl.proxy());
+ DebugSetImplThreadAndMainThreadBlocked(impl.task_runner_provider());
scoped_refptr<media::VideoFrame> video_frame = media::VideoFrame::CreateFrame(
media::PIXEL_FORMAT_YV12, gfx::Size(10, 10), gfx::Rect(10, 10),
@@ -87,7 +88,7 @@ TEST(VideoLayerImplTest, OccludesOtherLayers) {
LayerTestCommon::LayerImplTest impl;
impl.host_impl()->SetViewportSize(layer_size);
- DebugSetImplThreadAndMainThreadBlocked(impl.proxy());
+ DebugSetImplThreadAndMainThreadBlocked(impl.task_runner_provider());
auto active_tree = impl.host_impl()->active_tree();
// Create a video layer with no frame on top of another layer.
@@ -127,7 +128,7 @@ TEST(VideoLayerImplTest, OccludesOtherLayers) {
TEST(VideoLayerImplTest, DidBecomeActiveShouldSetActiveVideoLayer) {
LayerTestCommon::LayerImplTest impl;
- DebugSetImplThreadAndMainThreadBlocked(impl.proxy());
+ DebugSetImplThreadAndMainThreadBlocked(impl.task_runner_provider());
FakeVideoFrameProvider provider;
VideoLayerImpl* video_layer_impl =
@@ -147,7 +148,7 @@ TEST(VideoLayerImplTest, Rotated0) {
gfx::Size viewport_size(1000, 500);
LayerTestCommon::LayerImplTest impl;
- DebugSetImplThreadAndMainThreadBlocked(impl.proxy());
+ DebugSetImplThreadAndMainThreadBlocked(impl.task_runner_provider());
scoped_refptr<media::VideoFrame> video_frame = media::VideoFrame::CreateFrame(
media::PIXEL_FORMAT_YV12, gfx::Size(20, 10), gfx::Rect(20, 10),
@@ -183,7 +184,7 @@ TEST(VideoLayerImplTest, Rotated90) {
gfx::Size viewport_size(1000, 500);
LayerTestCommon::LayerImplTest impl;
- DebugSetImplThreadAndMainThreadBlocked(impl.proxy());
+ DebugSetImplThreadAndMainThreadBlocked(impl.task_runner_provider());
scoped_refptr<media::VideoFrame> video_frame = media::VideoFrame::CreateFrame(
media::PIXEL_FORMAT_YV12, gfx::Size(20, 10), gfx::Rect(20, 10),
@@ -219,7 +220,7 @@ TEST(VideoLayerImplTest, Rotated180) {
gfx::Size viewport_size(1000, 500);
LayerTestCommon::LayerImplTest impl;
- DebugSetImplThreadAndMainThreadBlocked(impl.proxy());
+ DebugSetImplThreadAndMainThreadBlocked(impl.task_runner_provider());
scoped_refptr<media::VideoFrame> video_frame = media::VideoFrame::CreateFrame(
media::PIXEL_FORMAT_YV12, gfx::Size(20, 10), gfx::Rect(20, 10),
@@ -255,7 +256,7 @@ TEST(VideoLayerImplTest, Rotated270) {
gfx::Size viewport_size(1000, 500);
LayerTestCommon::LayerImplTest impl;
- DebugSetImplThreadAndMainThreadBlocked(impl.proxy());
+ DebugSetImplThreadAndMainThreadBlocked(impl.task_runner_provider());
scoped_refptr<media::VideoFrame> video_frame = media::VideoFrame::CreateFrame(
media::PIXEL_FORMAT_YV12, gfx::Size(20, 10), gfx::Rect(20, 10),
@@ -294,7 +295,7 @@ TEST(VideoLayerImplTest, SoftwareVideoFrameGeneratesYUVQuad) {
gfx::Size viewport_size(1000, 1000);
LayerTestCommon::LayerImplTest impl;
- DebugSetImplThreadAndMainThreadBlocked(impl.proxy());
+ DebugSetImplThreadAndMainThreadBlocked(impl.task_runner_provider());
gpu::MailboxHolder mailbox_holder;
mailbox_holder.mailbox.name[0] = 1;
@@ -331,7 +332,7 @@ TEST(VideoLayerImplTest, NativeYUVFrameGeneratesYUVQuad) {
gfx::Size viewport_size(1000, 1000);
LayerTestCommon::LayerImplTest impl;
- DebugSetImplThreadAndMainThreadBlocked(impl.proxy());
+ DebugSetImplThreadAndMainThreadBlocked(impl.task_runner_provider());
gpu::MailboxHolder mailbox_holder;
mailbox_holder.mailbox.name[0] = 1;
« no previous file with comments | « cc/layers/video_layer_impl.cc ('k') | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698