| 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 DISALLOW_COPY_AND_ASSIGN(ScopedTextureProvider); | 314 DISALLOW_COPY_AND_ASSIGN(ScopedTextureProvider); |
| 315 }; | 315 }; |
| 316 | 316 |
| 317 class CC_EXPORT ScopedSkSurfaceProvider { | 317 class CC_EXPORT ScopedSkSurfaceProvider { |
| 318 public: | 318 public: |
| 319 ScopedSkSurfaceProvider(ContextProvider* context_provider, | 319 ScopedSkSurfaceProvider(ContextProvider* context_provider, |
| 320 ScopedWriteLockGL* resource_lock, | 320 ScopedWriteLockGL* resource_lock, |
| 321 bool use_mailbox, | 321 bool use_mailbox, |
| 322 bool use_distance_field_text, | 322 bool use_distance_field_text, |
| 323 bool can_use_lcd_text, | 323 bool can_use_lcd_text, |
| 324 bool ignore_color_space, |
| 324 int msaa_sample_count); | 325 int msaa_sample_count); |
| 325 ~ScopedSkSurfaceProvider(); | 326 ~ScopedSkSurfaceProvider(); |
| 326 | 327 |
| 327 SkSurface* sk_surface() { return sk_surface_.get(); } | 328 SkSurface* sk_surface() { return sk_surface_.get(); } |
| 328 | 329 |
| 329 private: | 330 private: |
| 330 ScopedTextureProvider texture_provider_; | 331 ScopedTextureProvider texture_provider_; |
| 331 sk_sp<SkSurface> sk_surface_; | 332 sk_sp<SkSurface> sk_surface_; |
| 332 | 333 |
| 333 DISALLOW_COPY_AND_ASSIGN(ScopedSkSurfaceProvider); | 334 DISALLOW_COPY_AND_ASSIGN(ScopedSkSurfaceProvider); |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 // A process-unique ID used for disambiguating memory dumps from different | 711 // A process-unique ID used for disambiguating memory dumps from different |
| 711 // resource providers. | 712 // resource providers. |
| 712 int tracing_id_; | 713 int tracing_id_; |
| 713 | 714 |
| 714 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 715 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 715 }; | 716 }; |
| 716 | 717 |
| 717 } // namespace cc | 718 } // namespace cc |
| 718 | 719 |
| 719 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 720 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |