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" |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 void PlaybackOnWorkerThread( | 40 void PlaybackOnWorkerThread( |
41 ResourceProvider::ScopedWriteLockGL* resource_lock, | 41 ResourceProvider::ScopedWriteLockGL* resource_lock, |
42 const gpu::SyncToken& sync_token, | 42 const gpu::SyncToken& sync_token, |
43 bool resource_has_previous_content, | 43 bool resource_has_previous_content, |
44 const RasterSource* raster_source, | 44 const RasterSource* raster_source, |
45 const gfx::Rect& raster_full_rect, | 45 const gfx::Rect& raster_full_rect, |
46 const gfx::Rect& raster_dirty_rect, | 46 const gfx::Rect& raster_dirty_rect, |
47 uint64_t new_content_id, | 47 uint64_t new_content_id, |
48 float scale, | 48 float scale, |
| 49 const gfx::Vector2dF& translation, |
49 const RasterSource::PlaybackSettings& playback_settings); | 50 const RasterSource::PlaybackSettings& playback_settings); |
50 | 51 |
51 private: | 52 private: |
52 class RasterBufferImpl : public RasterBuffer { | 53 class RasterBufferImpl : public RasterBuffer { |
53 public: | 54 public: |
54 RasterBufferImpl(GpuRasterBufferProvider* client, | 55 RasterBufferImpl(GpuRasterBufferProvider* client, |
55 ResourceProvider* resource_provider, | 56 ResourceProvider* resource_provider, |
56 ResourceId resource_id, | 57 ResourceId resource_id, |
57 bool async_worker_context_enabled, | 58 bool async_worker_context_enabled, |
58 bool resource_has_previous_content); | 59 bool resource_has_previous_content); |
59 ~RasterBufferImpl() override; | 60 ~RasterBufferImpl() override; |
60 | 61 |
61 // Overridden from RasterBuffer: | 62 // Overridden from RasterBuffer: |
62 void Playback( | 63 void Playback( |
63 const RasterSource* raster_source, | 64 const RasterSource* raster_source, |
64 const gfx::Rect& raster_full_rect, | 65 const gfx::Rect& raster_full_rect, |
65 const gfx::Rect& raster_dirty_rect, | 66 const gfx::Rect& raster_dirty_rect, |
66 uint64_t new_content_id, | 67 uint64_t new_content_id, |
67 float scale, | 68 float scale, |
| 69 const gfx::Vector2dF& translation, |
68 const RasterSource::PlaybackSettings& playback_settings) override; | 70 const RasterSource::PlaybackSettings& playback_settings) override; |
69 | 71 |
70 void set_sync_token(const gpu::SyncToken& sync_token) { | 72 void set_sync_token(const gpu::SyncToken& sync_token) { |
71 sync_token_ = sync_token; | 73 sync_token_ = sync_token; |
72 } | 74 } |
73 | 75 |
74 private: | 76 private: |
75 GpuRasterBufferProvider* const client_; | 77 GpuRasterBufferProvider* const client_; |
76 ResourceProvider::ScopedWriteLockGL lock_; | 78 ResourceProvider::ScopedWriteLockGL lock_; |
77 const bool resource_has_previous_content_; | 79 const bool resource_has_previous_content_; |
(...skipping 11 matching lines...) Expand all Loading... |
89 const bool async_worker_context_enabled_; | 91 const bool async_worker_context_enabled_; |
90 | 92 |
91 std::set<RasterBufferImpl*> pending_raster_buffers_; | 93 std::set<RasterBufferImpl*> pending_raster_buffers_; |
92 | 94 |
93 DISALLOW_COPY_AND_ASSIGN(GpuRasterBufferProvider); | 95 DISALLOW_COPY_AND_ASSIGN(GpuRasterBufferProvider); |
94 }; | 96 }; |
95 | 97 |
96 } // namespace cc | 98 } // namespace cc |
97 | 99 |
98 #endif // CC_RASTER_GPU_RASTER_BUFFER_PROVIDER_H_ | 100 #endif // CC_RASTER_GPU_RASTER_BUFFER_PROVIDER_H_ |
OLD | NEW |