| 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 "cc/layers/content_layer_client.h" | 5 #include "cc/layers/content_layer_client.h" |
| 6 #include "cc/layers/picture_layer.h" | 6 #include "cc/layers/picture_layer.h" |
| 7 #include "cc/output/copy_output_request.h" | 7 #include "cc/output/copy_output_request.h" |
| 8 #include "cc/playback/display_item_list.h" | 8 #include "cc/playback/display_item_list.h" |
| 9 #include "cc/playback/display_item_list_settings.h" | 9 #include "cc/playback/display_item_list_settings.h" |
| 10 #include "cc/playback/drawing_display_item.h" | 10 #include "cc/playback/drawing_display_item.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 base::FilePath ref_file_; | 85 base::FilePath ref_file_; |
| 86 scoped_ptr<SkBitmap> result_bitmap_; | 86 scoped_ptr<SkBitmap> result_bitmap_; |
| 87 RasterMode raster_mode_; | 87 RasterMode raster_mode_; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 class BlueYellowClient : public ContentLayerClient { | 90 class BlueYellowClient : public ContentLayerClient { |
| 91 public: | 91 public: |
| 92 explicit BlueYellowClient(const gfx::Size& size) | 92 explicit BlueYellowClient(const gfx::Size& size) |
| 93 : size_(size), blue_top_(true) {} | 93 : size_(size), blue_top_(true) {} |
| 94 | 94 |
| 95 void PaintContents(SkCanvas* canvas, | |
| 96 const gfx::Rect& clip, | |
| 97 PaintingControlSetting painting_status) override {} | |
| 98 | |
| 99 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( | 95 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( |
| 100 const gfx::Rect& clip, | 96 const gfx::Rect& clip, |
| 101 PaintingControlSetting painting_status) override { | 97 PaintingControlSetting painting_status) override { |
| 102 DisplayItemListSettings settings; | 98 DisplayItemListSettings settings; |
| 103 settings.use_cached_picture = false; | 99 settings.use_cached_picture = false; |
| 104 scoped_refptr<DisplayItemList> display_list = | 100 scoped_refptr<DisplayItemList> display_list = |
| 105 DisplayItemList::Create(clip, settings); | 101 DisplayItemList::Create(clip, settings); |
| 106 | 102 |
| 107 SkPictureRecorder recorder; | 103 SkPictureRecorder recorder; |
| 108 skia::RefPtr<SkCanvas> canvas = skia::SharePtr( | 104 skia::RefPtr<SkCanvas> canvas = skia::SharePtr( |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 PartialRaster_SingleThread_GpuRaster) { | 209 PartialRaster_SingleThread_GpuRaster) { |
| 214 RunRasterPixelTest( | 210 RunRasterPixelTest( |
| 215 false, GPU, picture_layer_, | 211 false, GPU, picture_layer_, |
| 216 base::FilePath(FILE_PATH_LITERAL("blue_yellow_partial_flipped.png"))); | 212 base::FilePath(FILE_PATH_LITERAL("blue_yellow_partial_flipped.png"))); |
| 217 } | 213 } |
| 218 | 214 |
| 219 } // namespace | 215 } // namespace |
| 220 } // namespace cc | 216 } // namespace cc |
| 221 | 217 |
| 222 #endif // !defined(OS_ANDROID) | 218 #endif // !defined(OS_ANDROID) |
| OLD | NEW |