| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_RESOURCES_RESOURCE_PROVIDER_H_ | 5 #ifndef CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| 6 #define CC_RESOURCES_RESOURCE_PROVIDER_H_ | 6 #define CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 unsigned texture_id() const { return texture_id_; } | 276 unsigned texture_id() const { return texture_id_; } |
| 277 GLenum target() const { return target_; } | 277 GLenum target() const { return target_; } |
| 278 ResourceFormat format() const { return format_; } | 278 ResourceFormat format() const { return format_; } |
| 279 const gfx::Size& size() const { return size_; } | 279 const gfx::Size& size() const { return size_; } |
| 280 sk_sp<SkColorSpace> sk_color_space() const { return sk_color_space_; } | 280 sk_sp<SkColorSpace> sk_color_space() const { return sk_color_space_; } |
| 281 | 281 |
| 282 const TextureMailbox& mailbox() const { return mailbox_; } | 282 const TextureMailbox& mailbox() const { return mailbox_; } |
| 283 | 283 |
| 284 void set_sync_token(const gpu::SyncToken& sync_token) { | 284 void set_sync_token(const gpu::SyncToken& sync_token) { |
| 285 sync_token_ = sync_token; | 285 sync_token_ = sync_token; |
| 286 set_sync_token_ = true; |
| 286 } | 287 } |
| 287 | 288 |
| 288 void set_synchronized(bool synchronized) { synchronized_ = synchronized; } | 289 void set_synchronized(bool synchronized) { synchronized_ = synchronized; } |
| 289 | 290 |
| 290 private: | 291 private: |
| 291 ResourceProvider* resource_provider_; | 292 ResourceProvider* resource_provider_; |
| 292 ResourceId resource_id_; | 293 ResourceId resource_id_; |
| 293 unsigned texture_id_; | 294 unsigned texture_id_; |
| 294 GLenum target_; | 295 GLenum target_; |
| 295 ResourceFormat format_; | 296 ResourceFormat format_; |
| 296 gfx::Size size_; | 297 gfx::Size size_; |
| 297 TextureMailbox mailbox_; | 298 TextureMailbox mailbox_; |
| 298 gpu::SyncToken sync_token_; | 299 gpu::SyncToken sync_token_; |
| 300 bool set_sync_token_; |
| 299 bool synchronized_; | 301 bool synchronized_; |
| 300 base::ThreadChecker thread_checker_; | 302 base::ThreadChecker thread_checker_; |
| 301 sk_sp<SkColorSpace> sk_color_space_; | 303 sk_sp<SkColorSpace> sk_color_space_; |
| 302 | 304 |
| 303 DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockGL); | 305 DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockGL); |
| 304 }; | 306 }; |
| 305 | 307 |
| 306 class CC_EXPORT ScopedTextureProvider { | 308 class CC_EXPORT ScopedTextureProvider { |
| 307 public: | 309 public: |
| 308 ScopedTextureProvider(gpu::gles2::GLES2Interface* gl, | 310 ScopedTextureProvider(gpu::gles2::GLES2Interface* gl, |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 // A process-unique ID used for disambiguating memory dumps from different | 718 // A process-unique ID used for disambiguating memory dumps from different |
| 717 // resource providers. | 719 // resource providers. |
| 718 int tracing_id_; | 720 int tracing_id_; |
| 719 | 721 |
| 720 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 722 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 721 }; | 723 }; |
| 722 | 724 |
| 723 } // namespace cc | 725 } // namespace cc |
| 724 | 726 |
| 725 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 727 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |