| 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 | 363 |
| 364 void InitSkSurface(GrContext* gr_context, | 364 void InitSkSurface(GrContext* gr_context, |
| 365 bool use_distance_field_text, | 365 bool use_distance_field_text, |
| 366 bool can_use_lcd_text, | 366 bool can_use_lcd_text, |
| 367 int msaa_sample_count); | 367 int msaa_sample_count); |
| 368 void ReleaseSkSurface(); | 368 void ReleaseSkSurface(); |
| 369 | 369 |
| 370 SkSurface* sk_surface() { return sk_surface_.get(); } | 370 SkSurface* sk_surface() { return sk_surface_.get(); } |
| 371 | 371 |
| 372 gfx::Size GetResourceSize() const { return resource_->size; } | 372 gfx::Size GetResourceSize() const { return resource_->size; } |
| 373 ResourceFormat GetResourceFormat() const { return resource_->format; } |
| 373 | 374 |
| 374 void UpdateResourceSyncToken(const gpu::SyncToken& sync_token) { | 375 void UpdateResourceSyncToken(const gpu::SyncToken& sync_token) { |
| 375 set_sync_token_ = true; | 376 set_sync_token_ = true; |
| 376 sync_token_ = sync_token; | 377 sync_token_ = sync_token; |
| 377 } | 378 } |
| 378 | 379 |
| 379 private: | 380 private: |
| 380 ResourceProvider* resource_provider_; | 381 ResourceProvider* resource_provider_; |
| 381 ResourceProvider::Resource* resource_; | 382 ResourceProvider::Resource* resource_; |
| 382 base::ThreadChecker thread_checker_; | 383 base::ThreadChecker thread_checker_; |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 const size_t id_allocation_chunk_size_; | 680 const size_t id_allocation_chunk_size_; |
| 680 std::unique_ptr<IdAllocator> texture_id_allocator_; | 681 std::unique_ptr<IdAllocator> texture_id_allocator_; |
| 681 std::unique_ptr<IdAllocator> buffer_id_allocator_; | 682 std::unique_ptr<IdAllocator> buffer_id_allocator_; |
| 682 | 683 |
| 683 bool use_sync_query_; | 684 bool use_sync_query_; |
| 684 std::vector<unsigned> use_image_texture_targets_; | 685 std::vector<unsigned> use_image_texture_targets_; |
| 685 | 686 |
| 686 // A process-unique ID used for disambiguating memory dumps from different | 687 // A process-unique ID used for disambiguating memory dumps from different |
| 687 // resource providers. | 688 // resource providers. |
| 688 int tracing_id_; | 689 int tracing_id_; |
| 689 | 690 friend class GpuRasterizer; |
| 690 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 691 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 691 }; | 692 }; |
| 692 | 693 |
| 693 } // namespace cc | 694 } // namespace cc |
| 694 | 695 |
| 695 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 696 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |