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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 | 328 |
329 DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockGpuMemoryBuffer); | 329 DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockGpuMemoryBuffer); |
330 }; | 330 }; |
331 | 331 |
332 class CC_EXPORT ScopedWriteLockGr { | 332 class CC_EXPORT ScopedWriteLockGr { |
333 public: | 333 public: |
334 ScopedWriteLockGr(ResourceProvider* resource_provider, | 334 ScopedWriteLockGr(ResourceProvider* resource_provider, |
335 ResourceProvider::ResourceId resource_id); | 335 ResourceProvider::ResourceId resource_id); |
336 ~ScopedWriteLockGr(); | 336 ~ScopedWriteLockGr(); |
337 | 337 |
338 SkSurface* GetSkSurface(bool use_distance_field_text, | 338 SkSurface* GetSkSurface(bool use_distance_field_text); |
339 bool can_use_lcd_text); | |
340 | 339 |
341 private: | 340 private: |
342 bool SurfaceHasMatchingProperties(bool use_distance_field_text, | |
343 bool can_use_lcd_text) const; | |
344 | |
345 ResourceProvider* resource_provider_; | 341 ResourceProvider* resource_provider_; |
346 ResourceProvider::Resource* resource_; | 342 ResourceProvider::Resource* resource_; |
347 base::ThreadChecker thread_checker_; | 343 base::ThreadChecker thread_checker_; |
348 | 344 |
349 DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockGr); | 345 DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockGr); |
350 }; | 346 }; |
351 | 347 |
352 class Fence : public base::RefCounted<Fence> { | 348 class Fence : public base::RefCounted<Fence> { |
353 public: | 349 public: |
354 Fence() {} | 350 Fence() {} |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 return format_gl_data_format[format]; | 640 return format_gl_data_format[format]; |
645 } | 641 } |
646 | 642 |
647 inline GLenum GLInternalFormat(ResourceFormat format) { | 643 inline GLenum GLInternalFormat(ResourceFormat format) { |
648 return GLDataFormat(format); | 644 return GLDataFormat(format); |
649 } | 645 } |
650 | 646 |
651 } // namespace cc | 647 } // namespace cc |
652 | 648 |
653 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 649 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
OLD | NEW |