| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // Used for syncing resources to the worker context. | 56 // Used for syncing resources to the worker context. |
| 57 virtual void OrderingBarrier() = 0; | 57 virtual void OrderingBarrier() = 0; |
| 58 | 58 |
| 59 // Returns the format to use for the tiles. | 59 // Returns the format to use for the tiles. |
| 60 virtual ResourceFormat GetResourceFormat(bool must_support_alpha) const = 0; | 60 virtual ResourceFormat GetResourceFormat(bool must_support_alpha) const = 0; |
| 61 | 61 |
| 62 // Determine if the resource requires swizzling. | 62 // Determine if the resource requires swizzling. |
| 63 virtual bool IsResourceSwizzleRequired(bool must_support_alpha) const = 0; | 63 virtual bool IsResourceSwizzleRequired(bool must_support_alpha) const = 0; |
| 64 | 64 |
| 65 // Determine if the RasterBufferProvider can handle partial raster into | 65 // Determine if the RasterBufferProvider can handle partial raster into |
| 66 // resources. | 66 // the Resource provided in AcquireBufferForRaster. |
| 67 virtual bool IsPartialRasterSupported() const = 0; | 67 virtual bool CanPartialRasterIntoProvidedResource() const = 0; |
| 68 | 68 |
| 69 // Shutdown for doing cleanup. | 69 // Shutdown for doing cleanup. |
| 70 virtual void Shutdown() = 0; | 70 virtual void Shutdown() = 0; |
| 71 | 71 |
| 72 protected: | 72 protected: |
| 73 // Check if resource format matches output format. | 73 // Check if resource format matches output format. |
| 74 static bool ResourceFormatRequiresSwizzle(ResourceFormat format); | 74 static bool ResourceFormatRequiresSwizzle(ResourceFormat format); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace cc | 77 } // namespace cc |
| 78 | 78 |
| 79 #endif // CC_RASTER_RASTER_BUFFER_PROVIDER_H_ | 79 #endif // CC_RASTER_RASTER_BUFFER_PROVIDER_H_ |
| OLD | NEW |