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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 float scale, | 100 float scale, |
101 const RasterSource::PlaybackSettings& playback_settings, | 101 const RasterSource::PlaybackSettings& playback_settings, |
102 uint64_t previous_content_id, | 102 uint64_t previous_content_id, |
103 uint64_t new_content_id); | 103 uint64_t new_content_id); |
104 void CopyOnWorkerThread(StagingBuffer* staging_buffer, | 104 void CopyOnWorkerThread(StagingBuffer* staging_buffer, |
105 ResourceProvider::ScopedWriteLockGL* resource_lock, | 105 ResourceProvider::ScopedWriteLockGL* resource_lock, |
106 const gpu::SyncToken& sync_token, | 106 const gpu::SyncToken& sync_token, |
107 const RasterSource* raster_source, | 107 const RasterSource* raster_source, |
108 uint64_t previous_content_id, | 108 uint64_t previous_content_id, |
109 uint64_t new_content_id); | 109 uint64_t new_content_id); |
| 110 gfx::BufferUsage StagingBufferUsage() const; |
110 | 111 |
111 ContextProvider* const compositor_context_provider_; | 112 ContextProvider* const compositor_context_provider_; |
112 ContextProvider* const worker_context_provider_; | 113 ContextProvider* const worker_context_provider_; |
113 ResourceProvider* const resource_provider_; | 114 ResourceProvider* const resource_provider_; |
114 const int max_bytes_per_copy_operation_; | 115 const int max_bytes_per_copy_operation_; |
115 const bool use_partial_raster_; | 116 const bool use_partial_raster_; |
116 | 117 |
117 // Context lock must be acquired when accessing this member. | 118 // Context lock must be acquired when accessing this member. |
118 int bytes_scheduled_since_last_flush_; | 119 int bytes_scheduled_since_last_flush_; |
119 | 120 |
120 const ResourceFormat preferred_tile_format_; | 121 const ResourceFormat preferred_tile_format_; |
121 StagingBufferPool staging_pool_; | 122 StagingBufferPool staging_pool_; |
122 | 123 |
123 const bool async_worker_context_enabled_; | 124 const bool async_worker_context_enabled_; |
124 | 125 |
125 std::set<RasterBufferImpl*> pending_raster_buffers_; | 126 std::set<RasterBufferImpl*> pending_raster_buffers_; |
126 | 127 |
127 DISALLOW_COPY_AND_ASSIGN(OneCopyRasterBufferProvider); | 128 DISALLOW_COPY_AND_ASSIGN(OneCopyRasterBufferProvider); |
128 }; | 129 }; |
129 | 130 |
130 } // namespace cc | 131 } // namespace cc |
131 | 132 |
132 #endif // CC_RASTER_ONE_COPY_RASTER_BUFFER_PROVIDER_H_ | 133 #endif // CC_RASTER_ONE_COPY_RASTER_BUFFER_PROVIDER_H_ |
OLD | NEW |