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

Side by Side Diff: content/browser/compositor/reflector_impl_unittest.cc

Issue 1097223002: Mac: Fix black flashing during tab switch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wait for swap to draw frames Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "cc/test/fake_output_surface_client.h" 8 #include "cc/test/fake_output_surface_client.h"
9 #include "cc/test/test_context_provider.h" 9 #include "cc/test/test_context_provider.h"
10 #include "cc/test/test_web_graphics_context_3d.h" 10 #include "cc/test/test_web_graphics_context_3d.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 : BrowserCompositorOutputSurface(context_provider, 75 : BrowserCompositorOutputSurface(context_provider,
76 vsync_manager, 76 vsync_manager,
77 CreateTestValidatorOzone().Pass()) {} 77 CreateTestValidatorOzone().Pass()) {}
78 78
79 void SetFlip(bool flip) { capabilities_.flipped_output_surface = flip; } 79 void SetFlip(bool flip) { capabilities_.flipped_output_surface = flip; }
80 80
81 void SwapBuffers(cc::CompositorFrame* frame) override {} 81 void SwapBuffers(cc::CompositorFrame* frame) override {}
82 82
83 #if defined(OS_MACOSX) 83 #if defined(OS_MACOSX)
84 void OnSurfaceDisplayed() override {} 84 void OnSurfaceDisplayed() override {}
85 void OnSurfaceRecycled() override {} 85 void SetSurfaceSuspendedForRecycle(bool suspended) override {}
86 bool ShouldNotShowFramesAfterRecycle() const override { return false; } 86 bool SurfaceShouldNotShowFramesAfterSuspendForRecycle() const override {
87 return false;
88 }
87 #endif 89 #endif
88 90
89 gfx::Size SurfaceSize() const override { return gfx::Size(256, 256); } 91 gfx::Size SurfaceSize() const override { return gfx::Size(256, 256); }
90 }; 92 };
91 93
92 const gfx::Rect kSubRect = gfx::Rect(0, 0, 64, 64); 94 const gfx::Rect kSubRect = gfx::Rect(0, 0, 64, 64);
93 const SkIRect kSkSubRect = SkIRect::MakeXYWH(0, 0, 64, 64); 95 const SkIRect kSkSubRect = SkIRect::MakeXYWH(0, 0, 64, 64);
94 96
95 } // namespace 97 } // namespace
96 98
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 plane_2.plane_z_order = 1; 195 plane_2.plane_z_order = 1;
194 list.push_back(plane_1); 196 list.push_back(plane_1);
195 list.push_back(plane_2); 197 list.push_back(plane_2);
196 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); 198 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list);
197 EXPECT_FALSE(list[0].overlay_handled); 199 EXPECT_FALSE(list[0].overlay_handled);
198 } 200 }
199 #endif // defined(USE_OZONE) 201 #endif // defined(USE_OZONE)
200 202
201 } // namespace 203 } // namespace
202 } // namespace content 204 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698