| 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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 unsigned gl_pixel_buffer_id; | 409 unsigned gl_pixel_buffer_id; |
| 410 // Query used to determine when asynchronous set pixels complete. | 410 // Query used to determine when asynchronous set pixels complete. |
| 411 unsigned gl_upload_query_id; | 411 unsigned gl_upload_query_id; |
| 412 TextureMailbox mailbox; | 412 TextureMailbox mailbox; |
| 413 ReleaseCallback release_callback; | 413 ReleaseCallback release_callback; |
| 414 uint8_t* pixels; | 414 uint8_t* pixels; |
| 415 uint8_t* pixel_buffer; | 415 uint8_t* pixel_buffer; |
| 416 int lock_for_read_count; | 416 int lock_for_read_count; |
| 417 int imported_count; | 417 int imported_count; |
| 418 int exported_count; | 418 int exported_count; |
| 419 bool locked_for_write; | 419 bool dirty_image : 1; |
| 420 Origin origin; | 420 bool locked_for_write : 1; |
| 421 bool marked_for_deletion; | 421 bool lost : 1; |
| 422 bool pending_set_pixels; | 422 bool marked_for_deletion : 1; |
| 423 bool set_pixels_completion_forced; | 423 bool pending_set_pixels : 1; |
| 424 bool allocated; | 424 bool set_pixels_completion_forced : 1; |
| 425 bool enable_read_lock_fences; | 425 bool allocated : 1; |
| 426 bool enable_read_lock_fences : 1; |
| 427 bool has_shared_bitmap_id : 1; |
| 428 bool allow_overlay : 1; |
| 426 scoped_refptr<Fence> read_lock_fence; | 429 scoped_refptr<Fence> read_lock_fence; |
| 427 gfx::Size size; | 430 gfx::Size size; |
| 431 Origin origin; |
| 428 GLenum target; | 432 GLenum target; |
| 429 // TODO(skyostil): Use a separate sampler object for filter state. | 433 // TODO(skyostil): Use a separate sampler object for filter state. |
| 430 GLenum original_filter; | 434 GLenum original_filter; |
| 431 GLenum filter; | 435 GLenum filter; |
| 432 unsigned image_id; | 436 unsigned image_id; |
| 433 unsigned bound_image_id; | 437 unsigned bound_image_id; |
| 434 bool dirty_image; | |
| 435 GLenum texture_pool; | 438 GLenum texture_pool; |
| 436 GLint wrap_mode; | 439 GLint wrap_mode; |
| 437 bool lost; | |
| 438 TextureUsageHint hint; | 440 TextureUsageHint hint; |
| 439 ResourceType type; | 441 ResourceType type; |
| 440 ResourceFormat format; | 442 ResourceFormat format; |
| 441 bool has_shared_bitmap_id; | |
| 442 bool allow_overlay; | |
| 443 SharedBitmapId shared_bitmap_id; | 443 SharedBitmapId shared_bitmap_id; |
| 444 SharedBitmap* shared_bitmap; | 444 SharedBitmap* shared_bitmap; |
| 445 linked_ptr<DirectRasterBuffer> direct_raster_buffer; | 445 linked_ptr<DirectRasterBuffer> direct_raster_buffer; |
| 446 linked_ptr<ImageRasterBuffer> image_raster_buffer; | 446 linked_ptr<ImageRasterBuffer> image_raster_buffer; |
| 447 linked_ptr<PixelRasterBuffer> pixel_raster_buffer; | 447 linked_ptr<PixelRasterBuffer> pixel_raster_buffer; |
| 448 }; | 448 }; |
| 449 typedef base::hash_map<ResourceId, Resource> ResourceMap; | 449 typedef base::hash_map<ResourceId, Resource> ResourceMap; |
| 450 | 450 |
| 451 class RasterBuffer { | 451 class RasterBuffer { |
| 452 public: | 452 public: |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 return format_gl_data_format[format]; | 692 return format_gl_data_format[format]; |
| 693 } | 693 } |
| 694 | 694 |
| 695 inline GLenum GLInternalFormat(ResourceFormat format) { | 695 inline GLenum GLInternalFormat(ResourceFormat format) { |
| 696 return GLDataFormat(format); | 696 return GLDataFormat(format); |
| 697 } | 697 } |
| 698 | 698 |
| 699 } // namespace cc | 699 } // namespace cc |
| 700 | 700 |
| 701 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 701 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |