| Index: cc/output/renderer_pixeltest.cc
|
| diff --git a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc
|
| index 4776dbb45a3184ff1e6c115378c8a3bb216fad2c..75585b17f5b6c6c0a782c2d66583ac8fc842e29d 100644
|
| --- a/cc/output/renderer_pixeltest.cc
|
| +++ b/cc/output/renderer_pixeltest.cc
|
| @@ -553,7 +553,7 @@ TEST_F(GLRendererPixelTestWithBackgroundFilter, InvertFilter) {
|
|
|
| // Software renderer does not support anti-aliased edges.
|
| TEST_F(GLRendererPixelTest, AntiAliasing) {
|
| - gfx::Rect rect(0, 0, 200, 200);
|
| + gfx::Rect rect(this->device_viewport_size_);
|
|
|
| RenderPass::Id id(1, 1);
|
| scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
|
| @@ -599,7 +599,7 @@ TEST_F(GLRendererPixelTest, AntiAliasing) {
|
| // This test tests that anti-aliasing works for axis aligned quads.
|
| // Anti-aliasing is only supported in the gl renderer.
|
| TEST_F(GLRendererPixelTest, AxisAligned) {
|
| - gfx::Rect rect(0, 0, 200, 200);
|
| + gfx::Rect rect(this->device_viewport_size_);
|
|
|
| RenderPass::Id id(1, 1);
|
| gfx::Transform transform_to_root;
|
| @@ -651,7 +651,7 @@ TEST_F(GLRendererPixelTest, AxisAligned) {
|
| // This test tests that forcing anti-aliasing off works as expected.
|
| // Anti-aliasing is only supported in the gl renderer.
|
| TEST_F(GLRendererPixelTest, ForceAntiAliasingOff) {
|
| - gfx::Rect rect(0, 0, 200, 200);
|
| + gfx::Rect rect(this->device_viewport_size_);
|
|
|
| RenderPass::Id id(1, 1);
|
| gfx::Transform transform_to_root;
|
| @@ -689,71 +689,6 @@ TEST_F(GLRendererPixelTest, ForceAntiAliasingOff) {
|
| ExactPixelComparator(false)));
|
| }
|
|
|
| -static void SyncPointCallback(int* callback_count) {
|
| - ++(*callback_count);
|
| - base::MessageLoop::current()->QuitWhenIdle();
|
| -}
|
| -
|
| -static void OtherCallback(int* callback_count) {
|
| - ++(*callback_count);
|
| - base::MessageLoop::current()->QuitWhenIdle();
|
| -}
|
| -
|
| -TEST_F(GLRendererPixelTest, SignalSyncPointOnLostContext) {
|
| - int sync_point_callback_count = 0;
|
| - int other_callback_count = 0;
|
| - unsigned sync_point = output_surface_->context3d()->insertSyncPoint();
|
| -
|
| - output_surface_->context3d()->loseContextCHROMIUM(
|
| - GL_GUILTY_CONTEXT_RESET_ARB, GL_INNOCENT_CONTEXT_RESET_ARB);
|
| -
|
| - SyncPointHelper::SignalSyncPoint(
|
| - output_surface_->context3d(),
|
| - sync_point,
|
| - base::Bind(&SyncPointCallback, &sync_point_callback_count));
|
| - EXPECT_EQ(0, sync_point_callback_count);
|
| - EXPECT_EQ(0, other_callback_count);
|
| -
|
| - // Make the sync point happen.
|
| - output_surface_->context3d()->finish();
|
| - // Post a task after the sync point.
|
| - base::MessageLoop::current()->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_point_callback_count);
|
| - EXPECT_EQ(1, other_callback_count);
|
| -}
|
| -
|
| -TEST_F(GLRendererPixelTest, SignalSyncPoint) {
|
| - int sync_point_callback_count = 0;
|
| - int other_callback_count = 0;
|
| - unsigned sync_point = output_surface_->context3d()->insertSyncPoint();
|
| -
|
| - SyncPointHelper::SignalSyncPoint(
|
| - output_surface_->context3d(),
|
| - sync_point,
|
| - base::Bind(&SyncPointCallback, &sync_point_callback_count));
|
| - EXPECT_EQ(0, sync_point_callback_count);
|
| - EXPECT_EQ(0, other_callback_count);
|
| -
|
| - // Make the sync point happen.
|
| - output_surface_->context3d()->finish();
|
| - // Post a task after the sync point.
|
| - base::MessageLoop::current()->PostTask(
|
| - FROM_HERE,
|
| - base::Bind(&OtherCallback, &other_callback_count));
|
| -
|
| - base::MessageLoop::current()->Run();
|
| -
|
| - // The sync point should have happened.
|
| - EXPECT_EQ(1, sync_point_callback_count);
|
| - EXPECT_EQ(1, other_callback_count);
|
| -}
|
| -
|
| TEST_F(GLRendererPixelTest, PictureDrawQuadIdentityScale) {
|
| gfx::Size pile_tile_size(1000, 1000);
|
| gfx::Rect viewport(this->device_viewport_size_);
|
| @@ -837,7 +772,7 @@ TEST_F(GLRendererPixelTest, PictureDrawQuadIdentityScale) {
|
|
|
| TEST_F(GLRendererPixelTest, PictureDrawQuadNonIdentityScale) {
|
| gfx::Size pile_tile_size(1000, 1000);
|
| - gfx::Rect viewport(gfx::Size(200, 200));
|
| + gfx::Rect viewport(this->device_viewport_size_);
|
| // TODO(enne): the renderer should figure this out on its own.
|
| bool contents_swizzled = !PlatformColor::SameComponentOrder(GL_RGBA);
|
|
|
| @@ -978,7 +913,6 @@ TEST_F(GLRendererPixelTest, PictureDrawQuadNonIdentityScale) {
|
| base::FilePath(FILE_PATH_LITERAL("four_blue_green_checkers.png")),
|
| ExactPixelComparator(true)));
|
| }
|
| -
|
| #endif // !defined(OS_ANDROID)
|
|
|
| } // namespace
|
|
|