| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |