| 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 ResourceId resource_id); | 339 ResourceId resource_id); |
| 340 ~ScopedReadLockGpuMemoryBuffer(); | 340 ~ScopedReadLockGpuMemoryBuffer(); |
| 341 | 341 |
| 342 // This may return nullptr. | 342 // This may return nullptr. |
| 343 gfx::GpuMemoryBuffer* GetGpuMemoryBuffer() const; | 343 gfx::GpuMemoryBuffer* GetGpuMemoryBuffer() const; |
| 344 | 344 |
| 345 // This returns the GL texture that is backed by a GL image bound to the | 345 // This returns the GL texture that is backed by a GL image bound to the |
| 346 // resource's GpuMemoryBuffer. | 346 // resource's GpuMemoryBuffer. |
| 347 unsigned GetTextureId() const; | 347 unsigned GetTextureId() const; |
| 348 | 348 |
| 349 ResourceId GetResourceId() const; |
| 350 |
| 349 private: | 351 private: |
| 350 ResourceProvider* resource_provider_; | 352 ResourceProvider* resource_provider_; |
| 351 ResourceId resource_id_; | 353 ResourceId resource_id_; |
| 352 const ResourceProvider::Resource* resource_; | 354 const ResourceProvider::Resource* resource_; |
| 353 base::ThreadChecker thread_checker_; | 355 base::ThreadChecker thread_checker_; |
| 354 | 356 |
| 355 DISALLOW_COPY_AND_ASSIGN(ScopedReadLockGpuMemoryBuffer); | 357 DISALLOW_COPY_AND_ASSIGN(ScopedReadLockGpuMemoryBuffer); |
| 356 }; | 358 }; |
| 357 | 359 |
| 358 class CC_EXPORT ScopedWriteLockGr { | 360 class CC_EXPORT ScopedWriteLockGr { |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 // A process-unique ID used for disambiguating memory dumps from different | 707 // A process-unique ID used for disambiguating memory dumps from different |
| 706 // resource providers. | 708 // resource providers. |
| 707 int tracing_id_; | 709 int tracing_id_; |
| 708 | 710 |
| 709 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 711 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 710 }; | 712 }; |
| 711 | 713 |
| 712 } // namespace cc | 714 } // namespace cc |
| 713 | 715 |
| 714 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 716 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |