Index: cc/output/gl_renderer_unittest.cc |
diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc |
index f50653ec1fad4e088d5155db8876731bc064f45c..6c66ae7f43b4b3aeb5106df2672a14c7503f483b 100644 |
--- a/cc/output/gl_renderer_unittest.cc |
+++ b/cc/output/gl_renderer_unittest.cc |
@@ -849,88 +849,6 @@ TEST_F(GLRendererTest, OffscreenOutputSurface) { |
Mock::VerifyAndClearExpectations(context); |
} |
-class VisibilityChangeIsLastCallTrackingContext |
- : public TestWebGraphicsContext3D { |
- public: |
- VisibilityChangeIsLastCallTrackingContext() |
- : last_call_was_set_visibility_(false) {} |
- |
- // TestWebGraphicsContext3D methods. |
- void flush() override { last_call_was_set_visibility_ = false; } |
- void deleteTexture(GLuint) override { last_call_was_set_visibility_ = false; } |
- void deleteFramebuffer(GLuint) override { |
- last_call_was_set_visibility_ = false; |
- } |
- void deleteQueryEXT(GLuint) override { |
- last_call_was_set_visibility_ = false; |
- } |
- void deleteRenderbuffer(GLuint) override { |
- last_call_was_set_visibility_ = false; |
- } |
- |
- // Methods added for test. |
- void set_last_call_was_visibility(bool visible) { |
- DCHECK(last_call_was_set_visibility_ == false); |
- last_call_was_set_visibility_ = true; |
- } |
- bool last_call_was_set_visibility() const { |
- return last_call_was_set_visibility_; |
- } |
- |
- private: |
- bool last_call_was_set_visibility_; |
-}; |
- |
-TEST_F(GLRendererTest, VisibilityChangeIsLastCall) { |
- scoped_ptr<VisibilityChangeIsLastCallTrackingContext> context_owned( |
- new VisibilityChangeIsLastCallTrackingContext); |
- VisibilityChangeIsLastCallTrackingContext* context = context_owned.get(); |
- |
- scoped_refptr<TestContextProvider> provider = |
- TestContextProvider::Create(std::move(context_owned)); |
- |
- provider->support()->SetSurfaceVisibleCallback(base::Bind( |
- &VisibilityChangeIsLastCallTrackingContext::set_last_call_was_visibility, |
- base::Unretained(context))); |
- |
- FakeOutputSurfaceClient output_surface_client; |
- scoped_ptr<OutputSurface> output_surface( |
- FakeOutputSurface::Create3d(provider)); |
- CHECK(output_surface->BindToClient(&output_surface_client)); |
- |
- scoped_ptr<SharedBitmapManager> shared_bitmap_manager( |
- new TestSharedBitmapManager()); |
- scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create( |
- output_surface.get(), shared_bitmap_manager.get()); |
- |
- RendererSettings settings; |
- FakeRendererClient renderer_client; |
- FakeRendererGL renderer(&renderer_client, |
- &settings, |
- output_surface.get(), |
- resource_provider.get()); |
- |
- gfx::Rect viewport_rect(1, 1); |
- AddRenderPass(&render_passes_in_draw_order_, |
- RenderPassId(1, 0), |
- viewport_rect, |
- gfx::Transform()); |
- |
- // Ensure that the call to SetSurfaceVisible is the last call issue to the |
- // GPU process, after glFlush is called, and after the RendererClient's |
- // SetManagedMemoryPolicy is called. Plumb this tracking between both the |
- // RenderClient and the Context by giving them both a pointer to a variable on |
- // the stack. |
- renderer.SetVisible(true); |
- renderer.DrawFrame(&render_passes_in_draw_order_, |
- 1.f, |
- viewport_rect, |
- viewport_rect, |
- false); |
- renderer.SetVisible(false); |
- EXPECT_TRUE(context->last_call_was_set_visibility()); |
-} |
- |
class TextureStateTrackingContext : public TestWebGraphicsContext3D { |
public: |
TextureStateTrackingContext() : active_texture_(GL_INVALID_ENUM) { |