OLD | NEW |
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 } | 52 } |
53 | 53 |
54 void RunOnDemandRasterPixelTest(); | 54 void RunOnDemandRasterPixelTest(); |
55 }; | 55 }; |
56 | 56 |
57 class BlueYellowLayerClient : public ContentLayerClient { | 57 class BlueYellowLayerClient : public ContentLayerClient { |
58 public: | 58 public: |
59 explicit BlueYellowLayerClient(gfx::Rect layer_rect) | 59 explicit BlueYellowLayerClient(gfx::Rect layer_rect) |
60 : layer_rect_(layer_rect) {} | 60 : layer_rect_(layer_rect) {} |
61 | 61 |
| 62 void DidChangeLayerCanUseLCDText() override {} |
| 63 |
62 bool FillsBoundsCompletely() const override { return false; } | 64 bool FillsBoundsCompletely() const override { return false; } |
63 | 65 |
64 void PaintContents( | 66 void PaintContents( |
65 SkCanvas* canvas, | 67 SkCanvas* canvas, |
66 const gfx::Rect& clip, | 68 const gfx::Rect& clip, |
67 ContentLayerClient::GraphicsContextStatus gc_status) override { | 69 ContentLayerClient::GraphicsContextStatus gc_status) override { |
68 SkPaint paint; | 70 SkPaint paint; |
69 paint.setColor(SK_ColorBLUE); | 71 paint.setColor(SK_ColorBLUE); |
70 canvas->drawRect(SkRect::MakeWH(layer_rect_.width(), | 72 canvas->drawRect(SkRect::MakeWH(layer_rect_.width(), |
71 layer_rect_.height() / 2), | 73 layer_rect_.height() / 2), |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 116 |
115 TEST_F(LayerTreeHostOnDemandRasterPixelTestWithGpuRasterizationForced, | 117 TEST_F(LayerTreeHostOnDemandRasterPixelTestWithGpuRasterizationForced, |
116 RasterPictureLayer) { | 118 RasterPictureLayer) { |
117 RunOnDemandRasterPixelTest(); | 119 RunOnDemandRasterPixelTest(); |
118 } | 120 } |
119 | 121 |
120 } // namespace | 122 } // namespace |
121 } // namespace cc | 123 } // namespace cc |
122 | 124 |
123 #endif // OS_ANDROID | 125 #endif // OS_ANDROID |
OLD | NEW |