| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 base::FilePath ref_file_; | 98 base::FilePath ref_file_; |
| 99 scoped_ptr<SkBitmap> result_bitmap_; | 99 scoped_ptr<SkBitmap> result_bitmap_; |
| 100 RasterMode raster_mode_; | 100 RasterMode raster_mode_; |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 class BlueYellowClient : public ContentLayerClient { | 103 class BlueYellowClient : public ContentLayerClient { |
| 104 public: | 104 public: |
| 105 explicit BlueYellowClient(const gfx::Size& size) | 105 explicit BlueYellowClient(const gfx::Size& size) |
| 106 : size_(size), blue_top_(true) {} | 106 : size_(size), blue_top_(true) {} |
| 107 | 107 |
| 108 gfx::Rect PaintableRegion() override { return gfx::Rect(size_); } |
| 108 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( | 109 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( |
| 109 const gfx::Rect& clip, | 110 const gfx::Rect& clip, |
| 110 PaintingControlSetting painting_status) override { | 111 PaintingControlSetting painting_status) override { |
| 111 DisplayItemListSettings settings; | 112 DisplayItemListSettings settings; |
| 112 settings.use_cached_picture = false; | 113 settings.use_cached_picture = false; |
| 113 scoped_refptr<DisplayItemList> display_list = | 114 scoped_refptr<DisplayItemList> display_list = |
| 114 DisplayItemList::Create(clip, settings); | 115 DisplayItemList::Create(clip, settings); |
| 115 | 116 |
| 116 SkPictureRecorder recorder; | 117 SkPictureRecorder recorder; |
| 117 skia::RefPtr<SkCanvas> canvas = skia::SharePtr( | 118 skia::RefPtr<SkCanvas> canvas = skia::SharePtr( |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 FullRaster_SingleThread_GpuRaster) { | 237 FullRaster_SingleThread_GpuRaster) { |
| 237 RunRasterPixelTest( | 238 RunRasterPixelTest( |
| 238 false, FULL_GPU, picture_layer_, | 239 false, FULL_GPU, picture_layer_, |
| 239 base::FilePath(FILE_PATH_LITERAL("blue_yellow_flipped.png"))); | 240 base::FilePath(FILE_PATH_LITERAL("blue_yellow_flipped.png"))); |
| 240 } | 241 } |
| 241 | 242 |
| 242 } // namespace | 243 } // namespace |
| 243 } // namespace cc | 244 } // namespace cc |
| 244 | 245 |
| 245 #endif // !defined(OS_ANDROID) | 246 #endif // !defined(OS_ANDROID) |
| OLD | NEW |