| 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_ONE_COPY_RASTER_BUFFER_PROVIDER_H_ | 5 #ifndef CC_RASTER_ONE_COPY_RASTER_BUFFER_PROVIDER_H_ |
| 6 #define CC_RASTER_ONE_COPY_RASTER_BUFFER_PROVIDER_H_ | 6 #define CC_RASTER_ONE_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 23 matching lines...) Expand all Loading... |
| 34 // Overridden from RasterBufferProvider: | 34 // Overridden from RasterBufferProvider: |
| 35 std::unique_ptr<RasterBuffer> AcquireBufferForRaster( | 35 std::unique_ptr<RasterBuffer> AcquireBufferForRaster( |
| 36 const Resource* resource, | 36 const Resource* resource, |
| 37 uint64_t resource_content_id, | 37 uint64_t resource_content_id, |
| 38 uint64_t previous_content_id) override; | 38 uint64_t previous_content_id) override; |
| 39 void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override; | 39 void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override; |
| 40 void OrderingBarrier() override; | 40 void OrderingBarrier() override; |
| 41 ResourceFormat GetResourceFormat(bool must_support_alpha) const override; | 41 ResourceFormat GetResourceFormat(bool must_support_alpha) const override; |
| 42 bool IsResourceSwizzleRequired(bool must_support_alpha) const override; | 42 bool IsResourceSwizzleRequired(bool must_support_alpha) const override; |
| 43 bool CanPartialRasterIntoProvidedResource() const override; | 43 bool CanPartialRasterIntoProvidedResource() const override; |
| 44 uint64_t SetReadyToDrawCallback( |
| 45 const ResourceProvider::ResourceIdArray& resource_ids, |
| 46 const base::Callback<void(uint64_t)>& callback, |
| 47 uint64_t pending_callback_id) const override; |
| 44 void Shutdown() override; | 48 void Shutdown() override; |
| 45 | 49 |
| 46 // Playback raster source and copy result into |resource|. | 50 // Playback raster source and copy result into |resource|. |
| 47 void PlaybackAndCopyOnWorkerThread( | 51 void PlaybackAndCopyOnWorkerThread( |
| 48 const Resource* resource, | 52 const Resource* resource, |
| 49 ResourceProvider::ScopedWriteLockGL* resource_lock, | 53 ResourceProvider::ScopedWriteLockGL* resource_lock, |
| 50 const gpu::SyncToken& sync_token, | 54 const gpu::SyncToken& sync_token, |
| 51 const RasterSource* raster_source, | 55 const RasterSource* raster_source, |
| 52 const gfx::Rect& raster_full_rect, | 56 const gfx::Rect& raster_full_rect, |
| 53 const gfx::Rect& raster_dirty_rect, | 57 const gfx::Rect& raster_dirty_rect, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 const bool async_worker_context_enabled_; | 128 const bool async_worker_context_enabled_; |
| 125 | 129 |
| 126 std::set<RasterBufferImpl*> pending_raster_buffers_; | 130 std::set<RasterBufferImpl*> pending_raster_buffers_; |
| 127 | 131 |
| 128 DISALLOW_COPY_AND_ASSIGN(OneCopyRasterBufferProvider); | 132 DISALLOW_COPY_AND_ASSIGN(OneCopyRasterBufferProvider); |
| 129 }; | 133 }; |
| 130 | 134 |
| 131 } // namespace cc | 135 } // namespace cc |
| 132 | 136 |
| 133 #endif // CC_RASTER_ONE_COPY_RASTER_BUFFER_PROVIDER_H_ | 137 #endif // CC_RASTER_ONE_COPY_RASTER_BUFFER_PROVIDER_H_ |
| OLD | NEW |