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 #ifndef CC_RASTER_RASTER_BUFFER_PROVIDER_H_ | 5 #ifndef CC_RASTER_RASTER_BUFFER_PROVIDER_H_ |
6 #define CC_RASTER_RASTER_BUFFER_PROVIDER_H_ | 6 #define CC_RASTER_RASTER_BUFFER_PROVIDER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "cc/playback/raster_source.h" | 10 #include "cc/playback/raster_source.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 // already partially complete, and only the subrect needs to be played back. | 35 // already partially complete, and only the subrect needs to be played back. |
36 static void PlaybackToMemory( | 36 static void PlaybackToMemory( |
37 void* memory, | 37 void* memory, |
38 ResourceFormat format, | 38 ResourceFormat format, |
39 const gfx::Size& size, | 39 const gfx::Size& size, |
40 size_t stride, | 40 size_t stride, |
41 const RasterSource* raster_source, | 41 const RasterSource* raster_source, |
42 const gfx::Rect& canvas_bitmap_rect, | 42 const gfx::Rect& canvas_bitmap_rect, |
43 const gfx::Rect& canvas_playback_rect, | 43 const gfx::Rect& canvas_playback_rect, |
44 float scale, | 44 float scale, |
| 45 sk_sp<SkColorSpace> color_space, |
45 const RasterSource::PlaybackSettings& playback_settings); | 46 const RasterSource::PlaybackSettings& playback_settings); |
46 | 47 |
47 // Acquire raster buffer. | 48 // Acquire raster buffer. |
48 virtual std::unique_ptr<RasterBuffer> AcquireBufferForRaster( | 49 virtual std::unique_ptr<RasterBuffer> AcquireBufferForRaster( |
49 const Resource* resource, | 50 const Resource* resource, |
50 uint64_t resource_content_id, | 51 uint64_t resource_content_id, |
51 uint64_t previous_content_id) = 0; | 52 uint64_t previous_content_id) = 0; |
52 | 53 |
53 // Release raster buffer. | 54 // Release raster buffer. |
54 virtual void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) = 0; | 55 virtual void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) = 0; |
(...skipping 15 matching lines...) Expand all Loading... |
70 virtual void Shutdown() = 0; | 71 virtual void Shutdown() = 0; |
71 | 72 |
72 protected: | 73 protected: |
73 // Check if resource format matches output format. | 74 // Check if resource format matches output format. |
74 static bool ResourceFormatRequiresSwizzle(ResourceFormat format); | 75 static bool ResourceFormatRequiresSwizzle(ResourceFormat format); |
75 }; | 76 }; |
76 | 77 |
77 } // namespace cc | 78 } // namespace cc |
78 | 79 |
79 #endif // CC_RASTER_RASTER_BUFFER_PROVIDER_H_ | 80 #endif // CC_RASTER_RASTER_BUFFER_PROVIDER_H_ |
OLD | NEW |