| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BITMAP_RASTER_BUFFER_PROVIDER_H_ | 5 #ifndef CC_RASTER_BITMAP_RASTER_BUFFER_PROVIDER_H_ |
| 6 #define CC_RASTER_BITMAP_RASTER_BUFFER_PROVIDER_H_ | 6 #define CC_RASTER_BITMAP_RASTER_BUFFER_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 static std::unique_ptr<RasterBufferProvider> Create( | 27 static std::unique_ptr<RasterBufferProvider> Create( |
| 28 ResourceProvider* resource_provider); | 28 ResourceProvider* resource_provider); |
| 29 | 29 |
| 30 // Overridden from RasterBufferProvider: | 30 // Overridden from RasterBufferProvider: |
| 31 std::unique_ptr<RasterBuffer> AcquireBufferForRaster( | 31 std::unique_ptr<RasterBuffer> AcquireBufferForRaster( |
| 32 const Resource* resource, | 32 const Resource* resource, |
| 33 uint64_t resource_content_id, | 33 uint64_t resource_content_id, |
| 34 uint64_t previous_content_id) override; | 34 uint64_t previous_content_id) override; |
| 35 void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override; | 35 void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override; |
| 36 void OrderingBarrier() override; | 36 void OrderingBarrier() override; |
| 37 void Flush() override; |
| 37 ResourceFormat GetResourceFormat(bool must_support_alpha) const override; | 38 ResourceFormat GetResourceFormat(bool must_support_alpha) const override; |
| 38 bool IsResourceSwizzleRequired(bool must_support_alpha) const override; | 39 bool IsResourceSwizzleRequired(bool must_support_alpha) const override; |
| 39 bool CanPartialRasterIntoProvidedResource() const override; | 40 bool CanPartialRasterIntoProvidedResource() const override; |
| 40 bool IsResourceReadyToDraw(ResourceId id) const override; | 41 bool IsResourceReadyToDraw(ResourceId id) const override; |
| 41 uint64_t SetReadyToDrawCallback( | 42 uint64_t SetReadyToDrawCallback( |
| 42 const ResourceProvider::ResourceIdArray& resource_ids, | 43 const ResourceProvider::ResourceIdArray& resource_ids, |
| 43 const base::Closure& callback, | 44 const base::Closure& callback, |
| 44 uint64_t pending_callback_id) const override; | 45 uint64_t pending_callback_id) const override; |
| 45 void Shutdown() override; | 46 void Shutdown() override; |
| 46 | 47 |
| 47 protected: | 48 protected: |
| 48 explicit BitmapRasterBufferProvider(ResourceProvider* resource_provider); | 49 explicit BitmapRasterBufferProvider(ResourceProvider* resource_provider); |
| 49 | 50 |
| 50 private: | 51 private: |
| 51 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> StateAsValue() | 52 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> StateAsValue() |
| 52 const; | 53 const; |
| 53 | 54 |
| 54 ResourceProvider* resource_provider_; | 55 ResourceProvider* resource_provider_; |
| 55 | 56 |
| 56 DISALLOW_COPY_AND_ASSIGN(BitmapRasterBufferProvider); | 57 DISALLOW_COPY_AND_ASSIGN(BitmapRasterBufferProvider); |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 } // namespace cc | 60 } // namespace cc |
| 60 | 61 |
| 61 #endif // CC_RASTER_BITMAP_RASTER_BUFFER_PROVIDER_H_ | 62 #endif // CC_RASTER_BITMAP_RASTER_BUFFER_PROVIDER_H_ |
| OLD | NEW |