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

Side by Side Diff: cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc

Issue 295193002: Get rid of graphics layer anchor points, and replace with transform origin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/layers/append_quads_data.h" 5 #include "cc/layers/append_quads_data.h"
6 #include "cc/layers/content_layer_client.h" 6 #include "cc/layers/content_layer_client.h"
7 #include "cc/layers/picture_layer.h" 7 #include "cc/layers/picture_layer.h"
8 #include "cc/layers/picture_layer_impl.h" 8 #include "cc/layers/picture_layer_impl.h"
9 #include "cc/quads/draw_quad.h" 9 #include "cc/quads/draw_quad.h"
10 #include "cc/test/layer_tree_pixel_test.h" 10 #include "cc/test/layer_tree_pixel_test.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 }; 91 };
92 92
93 TEST_F(LayerTreeHostOnDemandRasterPixelTest, RasterPictureLayer) { 93 TEST_F(LayerTreeHostOnDemandRasterPixelTest, RasterPictureLayer) {
94 // Use multiple colors in a single layer to prevent bypassing on-demand 94 // Use multiple colors in a single layer to prevent bypassing on-demand
95 // rasterization if a single solid color is detected in picture analysis. 95 // rasterization if a single solid color is detected in picture analysis.
96 gfx::Rect layer_rect(200, 200); 96 gfx::Rect layer_rect(200, 200);
97 BlueYellowLayerClient client(layer_rect); 97 BlueYellowLayerClient client(layer_rect);
98 scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client); 98 scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client);
99 99
100 layer->SetIsDrawable(true); 100 layer->SetIsDrawable(true);
101 layer->SetAnchorPoint(gfx::PointF());
102 layer->SetBounds(layer_rect.size()); 101 layer->SetBounds(layer_rect.size());
103 layer->SetPosition(layer_rect.origin()); 102 layer->SetPosition(layer_rect.origin());
104 103
105 RunPixelTest(GL_WITH_BITMAP, 104 RunPixelTest(GL_WITH_BITMAP,
106 layer, 105 layer,
107 base::FilePath(FILE_PATH_LITERAL("blue_yellow.png"))); 106 base::FilePath(FILE_PATH_LITERAL("blue_yellow.png")));
108 } 107 }
109 108
110 } // namespace 109 } // namespace
111 } // namespace cc 110 } // namespace cc
112 111
113 #endif // OS_ANDROID 112 #endif // OS_ANDROID
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_masks.cc ('k') | cc/trees/layer_tree_host_pixeltest_readback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698