| 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_GPU_RASTER_BUFFER_PROVIDER_H_ | 5 #ifndef CC_RASTER_GPU_RASTER_BUFFER_PROVIDER_H_ |
| 6 #define CC_RASTER_GPU_RASTER_BUFFER_PROVIDER_H_ | 6 #define CC_RASTER_GPU_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" |
| 11 #include "cc/raster/raster_buffer_provider.h" | 11 #include "cc/raster/raster_buffer_provider.h" |
| 12 #include "cc/resources/resource_provider.h" | 12 #include "cc/resources/resource_provider.h" |
| 13 #include "gpu/command_buffer/common/sync_token.h" | 13 #include "gpu/command_buffer/common/sync_token.h" |
| 14 | 14 |
| 15 namespace cc { | 15 namespace cc { |
| 16 class ContextProvider; | 16 class ContextProvider; |
| 17 | 17 |
| 18 class CC_EXPORT GpuRasterBufferProvider : public RasterBufferProvider { | 18 class CC_EXPORT GpuRasterBufferProvider : public RasterBufferProvider { |
| 19 public: | 19 public: |
| 20 GpuRasterBufferProvider(ContextProvider* compositor_context_provider, | 20 GpuRasterBufferProvider(ContextProvider* compositor_context_provider, |
| 21 ContextProvider* worker_context_provider, | 21 ContextProvider* worker_context_provider, |
| 22 ResourceProvider* resource_provider, | 22 ResourceProvider* resource_provider, |
| 23 bool use_distance_field_text, | 23 bool use_distance_field_text, |
| 24 int gpu_rasterization_msaa_sample_count, | 24 int gpu_rasterization_msaa_sample_count, |
| 25 ResourceFormat preferred_tile_format, |
| 25 bool async_worker_context_enabled); | 26 bool async_worker_context_enabled); |
| 26 ~GpuRasterBufferProvider() override; | 27 ~GpuRasterBufferProvider() override; |
| 27 | 28 |
| 28 // Overridden from RasterBufferProvider: | 29 // Overridden from RasterBufferProvider: |
| 29 std::unique_ptr<RasterBuffer> AcquireBufferForRaster( | 30 std::unique_ptr<RasterBuffer> AcquireBufferForRaster( |
| 30 const Resource* resource, | 31 const Resource* resource, |
| 31 uint64_t resource_content_id, | 32 uint64_t resource_content_id, |
| 32 uint64_t previous_content_id) override; | 33 uint64_t previous_content_id) override; |
| 33 void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override; | 34 void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override; |
| 34 void OrderingBarrier() override; | 35 void OrderingBarrier() override; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 gpu::SyncToken sync_token_; | 85 gpu::SyncToken sync_token_; |
| 85 | 86 |
| 86 DISALLOW_COPY_AND_ASSIGN(RasterBufferImpl); | 87 DISALLOW_COPY_AND_ASSIGN(RasterBufferImpl); |
| 87 }; | 88 }; |
| 88 | 89 |
| 89 ContextProvider* const compositor_context_provider_; | 90 ContextProvider* const compositor_context_provider_; |
| 90 ContextProvider* const worker_context_provider_; | 91 ContextProvider* const worker_context_provider_; |
| 91 ResourceProvider* const resource_provider_; | 92 ResourceProvider* const resource_provider_; |
| 92 const bool use_distance_field_text_; | 93 const bool use_distance_field_text_; |
| 93 const int msaa_sample_count_; | 94 const int msaa_sample_count_; |
| 95 const ResourceFormat preferred_tile_format_; |
| 94 const bool async_worker_context_enabled_; | 96 const bool async_worker_context_enabled_; |
| 95 | 97 |
| 96 std::set<RasterBufferImpl*> pending_raster_buffers_; | 98 std::set<RasterBufferImpl*> pending_raster_buffers_; |
| 97 | 99 |
| 98 DISALLOW_COPY_AND_ASSIGN(GpuRasterBufferProvider); | 100 DISALLOW_COPY_AND_ASSIGN(GpuRasterBufferProvider); |
| 99 }; | 101 }; |
| 100 | 102 |
| 101 } // namespace cc | 103 } // namespace cc |
| 102 | 104 |
| 103 #endif // CC_RASTER_GPU_RASTER_BUFFER_PROVIDER_H_ | 105 #endif // CC_RASTER_GPU_RASTER_BUFFER_PROVIDER_H_ |
| OLD | NEW |