| 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_ZERO_COPY_RASTER_BUFFER_PROVIDER_H_ | 5 #ifndef CC_RASTER_ZERO_COPY_RASTER_BUFFER_PROVIDER_H_ |
| 6 #define CC_RASTER_ZERO_COPY_RASTER_BUFFER_PROVIDER_H_ | 6 #define CC_RASTER_ZERO_COPY_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 21 matching lines...) Expand all Loading... |
| 32 // Overridden from RasterBufferProvider: | 32 // Overridden from RasterBufferProvider: |
| 33 std::unique_ptr<RasterBuffer> AcquireBufferForRaster( | 33 std::unique_ptr<RasterBuffer> AcquireBufferForRaster( |
| 34 const Resource* resource, | 34 const Resource* resource, |
| 35 uint64_t resource_content_id, | 35 uint64_t resource_content_id, |
| 36 uint64_t previous_content_id) override; | 36 uint64_t previous_content_id) override; |
| 37 void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override; | 37 void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override; |
| 38 void OrderingBarrier() override; | 38 void OrderingBarrier() override; |
| 39 ResourceFormat GetResourceFormat(bool must_support_alpha) const override; | 39 ResourceFormat GetResourceFormat(bool must_support_alpha) const override; |
| 40 bool IsResourceSwizzleRequired(bool must_support_alpha) const override; | 40 bool IsResourceSwizzleRequired(bool must_support_alpha) const override; |
| 41 bool CanPartialRasterIntoProvidedResource() const override; | 41 bool CanPartialRasterIntoProvidedResource() const override; |
| 42 bool IsResourceReadyToDraw(ResourceId id) const override; |
| 43 uint64_t SetReadyToDrawCallback( |
| 44 const ResourceProvider::ResourceIdArray& resource_ids, |
| 45 const base::Closure& callback, |
| 46 uint64_t pending_callback_id) const override; |
| 42 void Shutdown() override; | 47 void Shutdown() override; |
| 43 | 48 |
| 44 protected: | 49 protected: |
| 45 ZeroCopyRasterBufferProvider(ResourceProvider* resource_provider, | 50 ZeroCopyRasterBufferProvider(ResourceProvider* resource_provider, |
| 46 ResourceFormat preferred_tile_format); | 51 ResourceFormat preferred_tile_format); |
| 47 | 52 |
| 48 private: | 53 private: |
| 49 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> StateAsValue() | 54 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> StateAsValue() |
| 50 const; | 55 const; |
| 51 | 56 |
| 52 ResourceProvider* resource_provider_; | 57 ResourceProvider* resource_provider_; |
| 53 ResourceFormat preferred_tile_format_; | 58 ResourceFormat preferred_tile_format_; |
| 54 | 59 |
| 55 DISALLOW_COPY_AND_ASSIGN(ZeroCopyRasterBufferProvider); | 60 DISALLOW_COPY_AND_ASSIGN(ZeroCopyRasterBufferProvider); |
| 56 }; | 61 }; |
| 57 | 62 |
| 58 } // namespace cc | 63 } // namespace cc |
| 59 | 64 |
| 60 #endif // CC_RASTER_ZERO_COPY_RASTER_BUFFER_PROVIDER_H_ | 65 #endif // CC_RASTER_ZERO_COPY_RASTER_BUFFER_PROVIDER_H_ |
| OLD | NEW |