| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 | 332 |
| 333 DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockGpuMemoryBuffer); | 333 DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockGpuMemoryBuffer); |
| 334 }; | 334 }; |
| 335 | 335 |
| 336 class CC_EXPORT ScopedWriteLockGr { | 336 class CC_EXPORT ScopedWriteLockGr { |
| 337 public: | 337 public: |
| 338 ScopedWriteLockGr(ResourceProvider* resource_provider, | 338 ScopedWriteLockGr(ResourceProvider* resource_provider, |
| 339 ResourceProvider::ResourceId resource_id); | 339 ResourceProvider::ResourceId resource_id); |
| 340 ~ScopedWriteLockGr(); | 340 ~ScopedWriteLockGr(); |
| 341 | 341 |
| 342 void InitSkSurface(bool use_worker_context, | 342 void InitSkSurface(bool use_distance_field_text, |
| 343 bool use_distance_field_text, | |
| 344 bool can_use_lcd_text, | 343 bool can_use_lcd_text, |
| 345 int msaa_sample_count); | 344 int msaa_sample_count); |
| 346 void ReleaseSkSurface(); | 345 void ReleaseSkSurface(); |
| 347 | 346 |
| 348 SkSurface* sk_surface() { return sk_surface_.get(); } | 347 SkSurface* sk_surface() { return sk_surface_.get(); } |
| 349 ResourceProvider::Resource* resource() { return resource_; } | 348 ResourceProvider::Resource* resource() { return resource_; } |
| 350 | 349 |
| 351 private: | 350 private: |
| 352 ResourceProvider* resource_provider_; | 351 ResourceProvider* resource_provider_; |
| 353 ResourceProvider::Resource* resource_; | 352 ResourceProvider::Resource* resource_; |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 return format_gl_data_format[format]; | 659 return format_gl_data_format[format]; |
| 661 } | 660 } |
| 662 | 661 |
| 663 inline GLenum GLInternalFormat(ResourceFormat format) { | 662 inline GLenum GLInternalFormat(ResourceFormat format) { |
| 664 return GLDataFormat(format); | 663 return GLDataFormat(format); |
| 665 } | 664 } |
| 666 | 665 |
| 667 } // namespace cc | 666 } // namespace cc |
| 668 | 667 |
| 669 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 668 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |