OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "cc/layers/content_layer_client.h" | 7 #include "cc/layers/content_layer_client.h" |
8 #include "cc/layers/picture_layer.h" | 8 #include "cc/layers/picture_layer.h" |
9 #include "cc/output/copy_output_request.h" | 9 #include "cc/output/copy_output_request.h" |
10 #include "cc/playback/display_item_list.h" | 10 #include "cc/playback/display_item_list.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 126 |
127 SkPaint paint; | 127 SkPaint paint; |
128 paint.setStyle(SkPaint::kFill_Style); | 128 paint.setStyle(SkPaint::kFill_Style); |
129 | 129 |
130 paint.setColor(SK_ColorBLUE); | 130 paint.setColor(SK_ColorBLUE); |
131 canvas->drawRect(gfx::RectToSkRect(blue_rect), paint); | 131 canvas->drawRect(gfx::RectToSkRect(blue_rect), paint); |
132 paint.setColor(SK_ColorYELLOW); | 132 paint.setColor(SK_ColorYELLOW); |
133 canvas->drawRect(gfx::RectToSkRect(yellow_rect), paint); | 133 canvas->drawRect(gfx::RectToSkRect(yellow_rect), paint); |
134 | 134 |
135 display_list->CreateAndAppendItem<DrawingDisplayItem>( | 135 display_list->CreateAndAppendItem<DrawingDisplayItem>( |
136 PaintableRegion(), skia::AdoptRef(recorder.endRecordingAsPicture())); | 136 PaintableRegion(), recorder.finishRecordingAsPicture()); |
137 display_list->Finalize(); | 137 display_list->Finalize(); |
138 return display_list; | 138 return display_list; |
139 } | 139 } |
140 | 140 |
141 bool FillsBoundsCompletely() const override { return true; } | 141 bool FillsBoundsCompletely() const override { return true; } |
142 size_t GetApproximateUnsharedMemoryUsage() const override { return 0; } | 142 size_t GetApproximateUnsharedMemoryUsage() const override { return 0; } |
143 | 143 |
144 void set_blue_top(bool b) { blue_top_ = b; } | 144 void set_blue_top(bool b) { blue_top_ = b; } |
145 | 145 |
146 private: | 146 private: |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 FullRaster_SingleThread_GpuRaster) { | 234 FullRaster_SingleThread_GpuRaster) { |
235 RunRasterPixelTest( | 235 RunRasterPixelTest( |
236 false, FULL_GPU, picture_layer_, | 236 false, FULL_GPU, picture_layer_, |
237 base::FilePath(FILE_PATH_LITERAL("blue_yellow_flipped.png"))); | 237 base::FilePath(FILE_PATH_LITERAL("blue_yellow_flipped.png"))); |
238 } | 238 } |
239 | 239 |
240 } // namespace | 240 } // namespace |
241 } // namespace cc | 241 } // namespace cc |
242 | 242 |
243 #endif // !defined(OS_ANDROID) | 243 #endif // !defined(OS_ANDROID) |
OLD | NEW |