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/raster/raster_buffer.h" | 10 #include "cc/raster/raster_buffer.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 const Resource* resource, | 47 const Resource* resource, |
48 uint64_t resource_content_id, | 48 uint64_t resource_content_id, |
49 uint64_t previous_content_id) = 0; | 49 uint64_t previous_content_id) = 0; |
50 | 50 |
51 // Release raster buffer. | 51 // Release raster buffer. |
52 virtual void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) = 0; | 52 virtual void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) = 0; |
53 | 53 |
54 // Used for syncing resources to the worker context. | 54 // Used for syncing resources to the worker context. |
55 virtual void OrderingBarrier() = 0; | 55 virtual void OrderingBarrier() = 0; |
56 | 56 |
| 57 // In addition to above, also ensures that pending work is sent to the GPU |
| 58 // process. |
| 59 virtual void Flush() = 0; |
| 60 |
57 // Returns the format to use for the tiles. | 61 // Returns the format to use for the tiles. |
58 virtual ResourceFormat GetResourceFormat(bool must_support_alpha) const = 0; | 62 virtual ResourceFormat GetResourceFormat(bool must_support_alpha) const = 0; |
59 | 63 |
60 // Determine if the resource requires swizzling. | 64 // Determine if the resource requires swizzling. |
61 virtual bool IsResourceSwizzleRequired(bool must_support_alpha) const = 0; | 65 virtual bool IsResourceSwizzleRequired(bool must_support_alpha) const = 0; |
62 | 66 |
63 // Determine if the RasterBufferProvider can handle partial raster into | 67 // Determine if the RasterBufferProvider can handle partial raster into |
64 // the Resource provided in AcquireBufferForRaster. | 68 // the Resource provided in AcquireBufferForRaster. |
65 virtual bool CanPartialRasterIntoProvidedResource() const = 0; | 69 virtual bool CanPartialRasterIntoProvidedResource() const = 0; |
66 | 70 |
(...skipping 15 matching lines...) Expand all Loading... |
82 virtual void Shutdown() = 0; | 86 virtual void Shutdown() = 0; |
83 | 87 |
84 protected: | 88 protected: |
85 // Check if resource format matches output format. | 89 // Check if resource format matches output format. |
86 static bool ResourceFormatRequiresSwizzle(ResourceFormat format); | 90 static bool ResourceFormatRequiresSwizzle(ResourceFormat format); |
87 }; | 91 }; |
88 | 92 |
89 } // namespace cc | 93 } // namespace cc |
90 | 94 |
91 #endif // CC_RASTER_RASTER_BUFFER_PROVIDER_H_ | 95 #endif // CC_RASTER_RASTER_BUFFER_PROVIDER_H_ |
OLD | NEW |