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

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

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 years, 11 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
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_masks.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 }; 57 };
58 58
59 class BlueYellowLayerClient : public ContentLayerClient { 59 class BlueYellowLayerClient : public ContentLayerClient {
60 public: 60 public:
61 explicit BlueYellowLayerClient(gfx::Rect layer_rect) 61 explicit BlueYellowLayerClient(gfx::Rect layer_rect)
62 : layer_rect_(layer_rect) {} 62 : layer_rect_(layer_rect) {}
63 63
64 virtual void DidChangeLayerCanUseLCDText() OVERRIDE { } 64 virtual void DidChangeLayerCanUseLCDText() OVERRIDE { }
65 65
66 virtual void PaintContents(SkCanvas* canvas, 66 virtual void PaintContents(SkCanvas* canvas,
67 gfx::Rect clip, 67 const gfx::Rect& clip,
68 gfx::RectF* opaque) OVERRIDE { 68 gfx::RectF* opaque) OVERRIDE {
69 *opaque = gfx::RectF(layer_rect_.width(), layer_rect_.height()); 69 *opaque = gfx::RectF(layer_rect_.width(), layer_rect_.height());
70 70
71 SkPaint paint; 71 SkPaint paint;
72 paint.setColor(SK_ColorBLUE); 72 paint.setColor(SK_ColorBLUE);
73 canvas->drawRect(SkRect::MakeWH(layer_rect_.width(), 73 canvas->drawRect(SkRect::MakeWH(layer_rect_.width(),
74 layer_rect_.height() / 2), 74 layer_rect_.height() / 2),
75 paint); 75 paint);
76 76
77 paint.setColor(SK_ColorYELLOW); 77 paint.setColor(SK_ColorYELLOW);
(...skipping 23 matching lines...) Expand all
101 101
102 RunPixelTest(GL_WITH_BITMAP, 102 RunPixelTest(GL_WITH_BITMAP,
103 layer, 103 layer,
104 base::FilePath(FILE_PATH_LITERAL("blue_yellow.png"))); 104 base::FilePath(FILE_PATH_LITERAL("blue_yellow.png")));
105 } 105 }
106 106
107 } // namespace 107 } // namespace
108 } // namespace cc 108 } // namespace cc
109 109
110 #endif // OS_ANDROID 110 #endif // OS_ANDROID
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_masks.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698