| 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 <deque> | 8 #include <deque> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 ScopedWriteLockGpuMemoryBuffer(ResourceProvider* resource_provider, | 313 ScopedWriteLockGpuMemoryBuffer(ResourceProvider* resource_provider, |
| 314 ResourceProvider::ResourceId resource_id); | 314 ResourceProvider::ResourceId resource_id); |
| 315 ~ScopedWriteLockGpuMemoryBuffer(); | 315 ~ScopedWriteLockGpuMemoryBuffer(); |
| 316 | 316 |
| 317 gfx::GpuMemoryBuffer* GetGpuMemoryBuffer(); | 317 gfx::GpuMemoryBuffer* GetGpuMemoryBuffer(); |
| 318 | 318 |
| 319 private: | 319 private: |
| 320 ResourceProvider* resource_provider_; | 320 ResourceProvider* resource_provider_; |
| 321 ResourceProvider::Resource* resource_; | 321 ResourceProvider::Resource* resource_; |
| 322 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 322 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
| 323 gfx::GpuMemoryBuffer* gpu_memory_buffer_; | |
| 324 gfx::Size size_; | 323 gfx::Size size_; |
| 325 ResourceFormat format_; | 324 ResourceFormat format_; |
| 326 | 325 |
| 327 DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockGpuMemoryBuffer); | 326 DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockGpuMemoryBuffer); |
| 328 }; | 327 }; |
| 329 | 328 |
| 330 class CC_EXPORT ScopedWriteLockGr { | 329 class CC_EXPORT ScopedWriteLockGr { |
| 331 public: | 330 public: |
| 332 ScopedWriteLockGr(ResourceProvider* resource_provider, | 331 ScopedWriteLockGr(ResourceProvider* resource_provider, |
| 333 ResourceProvider::ResourceId resource_id); | 332 ResourceProvider::ResourceId resource_id); |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 return format_gl_data_format[format]; | 611 return format_gl_data_format[format]; |
| 613 } | 612 } |
| 614 | 613 |
| 615 inline GLenum GLInternalFormat(ResourceFormat format) { | 614 inline GLenum GLInternalFormat(ResourceFormat format) { |
| 616 return GLDataFormat(format); | 615 return GLDataFormat(format); |
| 617 } | 616 } |
| 618 | 617 |
| 619 } // namespace cc | 618 } // namespace cc |
| 620 | 619 |
| 621 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 620 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |