| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 explicit BlueYellowLayerClient(gfx::Rect layer_rect) | 62 explicit BlueYellowLayerClient(gfx::Rect layer_rect) |
| 63 : layer_rect_(layer_rect) {} | 63 : layer_rect_(layer_rect) {} |
| 64 | 64 |
| 65 virtual void DidChangeLayerCanUseLCDText() OVERRIDE { } | 65 virtual void DidChangeLayerCanUseLCDText() OVERRIDE { } |
| 66 | 66 |
| 67 virtual bool FillsBoundsCompletely() const OVERRIDE { return false; } | 67 virtual bool FillsBoundsCompletely() const OVERRIDE { return false; } |
| 68 | 68 |
| 69 virtual void PaintContents( | 69 virtual void PaintContents( |
| 70 SkCanvas* canvas, | 70 SkCanvas* canvas, |
| 71 const gfx::Rect& clip, | 71 const gfx::Rect& clip, |
| 72 gfx::RectF* opaque, | |
| 73 ContentLayerClient::GraphicsContextStatus gc_status) OVERRIDE { | 72 ContentLayerClient::GraphicsContextStatus gc_status) OVERRIDE { |
| 74 *opaque = gfx::RectF(layer_rect_.width(), layer_rect_.height()); | |
| 75 | |
| 76 SkPaint paint; | 73 SkPaint paint; |
| 77 paint.setColor(SK_ColorBLUE); | 74 paint.setColor(SK_ColorBLUE); |
| 78 canvas->drawRect(SkRect::MakeWH(layer_rect_.width(), | 75 canvas->drawRect(SkRect::MakeWH(layer_rect_.width(), |
| 79 layer_rect_.height() / 2), | 76 layer_rect_.height() / 2), |
| 80 paint); | 77 paint); |
| 81 | 78 |
| 82 paint.setColor(SK_ColorYELLOW); | 79 paint.setColor(SK_ColorYELLOW); |
| 83 canvas->drawRect( | 80 canvas->drawRect( |
| 84 SkRect::MakeXYWH(0, | 81 SkRect::MakeXYWH(0, |
| 85 layer_rect_.height() / 2, | 82 layer_rect_.height() / 2, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 119 |
| 123 TEST_F(LayerTreeHostOnDemandRasterPixelTestWithGpuRasterizationForced, | 120 TEST_F(LayerTreeHostOnDemandRasterPixelTestWithGpuRasterizationForced, |
| 124 RasterPictureLayer) { | 121 RasterPictureLayer) { |
| 125 RunOnDemandRasterPixelTest(); | 122 RunOnDemandRasterPixelTest(); |
| 126 } | 123 } |
| 127 | 124 |
| 128 } // namespace | 125 } // namespace |
| 129 } // namespace cc | 126 } // namespace cc |
| 130 | 127 |
| 131 #endif // OS_ANDROID | 128 #endif // OS_ANDROID |
| OLD | NEW |