| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 paint.setColor(SK_ColorYELLOW); | 74 paint.setColor(SK_ColorYELLOW); |
| 75 canvas->drawRect( | 75 canvas->drawRect( |
| 76 SkRect::MakeXYWH(0, | 76 SkRect::MakeXYWH(0, |
| 77 layer_rect_.height() / 2, | 77 layer_rect_.height() / 2, |
| 78 layer_rect_.width(), | 78 layer_rect_.width(), |
| 79 layer_rect_.height() / 2), | 79 layer_rect_.height() / 2), |
| 80 paint); | 80 paint); |
| 81 } | 81 } |
| 82 | 82 |
| 83 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( |
| 84 const gfx::Rect& clip, |
| 85 GraphicsContextStatus gc_status) override { |
| 86 NOTIMPLEMENTED(); |
| 87 return DisplayItemList::Create(); |
| 88 } |
| 89 |
| 83 private: | 90 private: |
| 84 gfx::Rect layer_rect_; | 91 gfx::Rect layer_rect_; |
| 85 }; | 92 }; |
| 86 | 93 |
| 87 void LayerTreeHostOnDemandRasterPixelTest::RunOnDemandRasterPixelTest() { | 94 void LayerTreeHostOnDemandRasterPixelTest::RunOnDemandRasterPixelTest() { |
| 88 // Use multiple colors in a single layer to prevent bypassing on-demand | 95 // Use multiple colors in a single layer to prevent bypassing on-demand |
| 89 // rasterization if a single solid color is detected in picture analysis. | 96 // rasterization if a single solid color is detected in picture analysis. |
| 90 gfx::Rect layer_rect(200, 200); | 97 gfx::Rect layer_rect(200, 200); |
| 91 BlueYellowLayerClient client(layer_rect); | 98 BlueYellowLayerClient client(layer_rect); |
| 92 scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client); | 99 scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 114 | 121 |
| 115 TEST_F(LayerTreeHostOnDemandRasterPixelTestWithGpuRasterizationForced, | 122 TEST_F(LayerTreeHostOnDemandRasterPixelTestWithGpuRasterizationForced, |
| 116 RasterPictureLayer) { | 123 RasterPictureLayer) { |
| 117 RunOnDemandRasterPixelTest(); | 124 RunOnDemandRasterPixelTest(); |
| 118 } | 125 } |
| 119 | 126 |
| 120 } // namespace | 127 } // namespace |
| 121 } // namespace cc | 128 } // namespace cc |
| 122 | 129 |
| 123 #endif // OS_ANDROID | 130 #endif // OS_ANDROID |
| OLD | NEW |