| Index: cc/output/gl_renderer_unittest.cc
|
| diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc
|
| index 70a65788e64bec1baa32a8f0db7df9022a62a6ca..1025ace562d8128b26bcb7c5331fa1d292341442 100644
|
| --- a/cc/output/gl_renderer_unittest.cc
|
| +++ b/cc/output/gl_renderer_unittest.cc
|
| @@ -10,7 +10,6 @@
|
|
|
| #include "base/location.h"
|
| #include "base/memory/ptr_util.h"
|
| -#include "base/single_thread_task_runner.h"
|
| #include "base/thread_task_runner_handle.h"
|
| #include "cc/base/math_util.h"
|
| #include "cc/output/compositor_frame_metadata.h"
|
| @@ -1880,89 +1879,6 @@ TEST_F(MockOutputSurfaceTest, DrawFrameAndResizeAndSwap) {
|
| renderer_->SwapBuffers(CompositorFrameMetadata());
|
| }
|
|
|
| -class GLRendererTestSyncPoint : public GLRendererPixelTest {
|
| - protected:
|
| - static void SyncTokenCallback(int* callback_count) {
|
| - ++(*callback_count);
|
| - base::MessageLoop::current()->QuitWhenIdle();
|
| - }
|
| -
|
| - static void OtherCallback(int* callback_count) {
|
| - ++(*callback_count);
|
| - base::MessageLoop::current()->QuitWhenIdle();
|
| - }
|
| -};
|
| -
|
| -#if !defined(OS_ANDROID)
|
| -TEST_F(GLRendererTestSyncPoint, SignalSyncPointOnLostContext) {
|
| - int sync_token_callback_count = 0;
|
| - int other_callback_count = 0;
|
| - gpu::gles2::GLES2Interface* gl =
|
| - output_surface_->context_provider()->ContextGL();
|
| - gpu::ContextSupport* context_support =
|
| - output_surface_->context_provider()->ContextSupport();
|
| -
|
| - const uint64_t fence_sync = gl->InsertFenceSyncCHROMIUM();
|
| - gl->ShallowFlushCHROMIUM();
|
| -
|
| - gpu::SyncToken sync_token;
|
| - gl->GenSyncTokenCHROMIUM(fence_sync, sync_token.GetData());
|
| -
|
| - gl->LoseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB,
|
| - GL_INNOCENT_CONTEXT_RESET_ARB);
|
| -
|
| - context_support->SignalSyncToken(
|
| - sync_token, base::Bind(&SyncTokenCallback, &sync_token_callback_count));
|
| - EXPECT_EQ(0, sync_token_callback_count);
|
| - EXPECT_EQ(0, other_callback_count);
|
| -
|
| - // Make the sync point happen.
|
| - gl->Finish();
|
| - // Post a task after the sync point.
|
| - base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| - FROM_HERE, base::Bind(&OtherCallback, &other_callback_count));
|
| -
|
| - base::MessageLoop::current()->Run();
|
| -
|
| - // The sync point shouldn't have happened since the context was lost.
|
| - EXPECT_EQ(0, sync_token_callback_count);
|
| - EXPECT_EQ(1, other_callback_count);
|
| -}
|
| -
|
| -TEST_F(GLRendererTestSyncPoint, SignalSyncPoint) {
|
| - int sync_token_callback_count = 0;
|
| - int other_callback_count = 0;
|
| -
|
| - gpu::gles2::GLES2Interface* gl =
|
| - output_surface_->context_provider()->ContextGL();
|
| - gpu::ContextSupport* context_support =
|
| - output_surface_->context_provider()->ContextSupport();
|
| -
|
| - const uint64_t fence_sync = gl->InsertFenceSyncCHROMIUM();
|
| - gl->ShallowFlushCHROMIUM();
|
| -
|
| - gpu::SyncToken sync_token;
|
| - gl->GenSyncTokenCHROMIUM(fence_sync, sync_token.GetData());
|
| -
|
| - context_support->SignalSyncToken(
|
| - sync_token, base::Bind(&SyncTokenCallback, &sync_token_callback_count));
|
| - EXPECT_EQ(0, sync_token_callback_count);
|
| - EXPECT_EQ(0, other_callback_count);
|
| -
|
| - // Make the sync point happen.
|
| - gl->Finish();
|
| - // Post a task after the sync point.
|
| - base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| - FROM_HERE, base::Bind(&OtherCallback, &other_callback_count));
|
| -
|
| - base::MessageLoop::current()->Run();
|
| -
|
| - // The sync point should have happened.
|
| - EXPECT_EQ(1, sync_token_callback_count);
|
| - EXPECT_EQ(1, other_callback_count);
|
| -}
|
| -#endif // OS_ANDROID
|
| -
|
| class TestOverlayProcessor : public OverlayProcessor {
|
| public:
|
| class Strategy : public OverlayProcessor::Strategy {
|
|
|