Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: cc/resources/resource_provider.h

Issue 197223003: Start of hardware overlay support in CC with Ubercompositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/quads/render_pass_unittest.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 ResourceFormat memory_efficient_texture_format() const { 87 ResourceFormat memory_efficient_texture_format() const {
88 return use_rgba_4444_texture_format_ ? RGBA_4444 : best_texture_format_; 88 return use_rgba_4444_texture_format_ ? RGBA_4444 : best_texture_format_;
89 } 89 }
90 ResourceFormat best_texture_format() const { return best_texture_format_; } 90 ResourceFormat best_texture_format() const { return best_texture_format_; }
91 size_t num_resources() const { return resources_.size(); } 91 size_t num_resources() const { return resources_.size(); }
92 92
93 // Checks whether a resource is in use by a consumer. 93 // Checks whether a resource is in use by a consumer.
94 bool InUseByConsumer(ResourceId id); 94 bool InUseByConsumer(ResourceId id);
95 95
96 bool IsLost(ResourceId id); 96 bool IsLost(ResourceId id);
97 bool AllowOverlay(ResourceId id);
97 98
98 // Producer interface. 99 // Producer interface.
99 100
100 ResourceType default_resource_type() const { return default_resource_type_; } 101 ResourceType default_resource_type() const { return default_resource_type_; }
101 ResourceType GetResourceType(ResourceId id); 102 ResourceType GetResourceType(ResourceId id);
102 103
103 // Creates a resource of the default resource type. 104 // Creates a resource of the default resource type.
104 ResourceId CreateResource(const gfx::Size& size, 105 ResourceId CreateResource(const gfx::Size& size,
105 GLint wrap_mode, 106 GLint wrap_mode,
106 TextureUsageHint hint, 107 TextureUsageHint hint,
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 unsigned image_id; 432 unsigned image_id;
432 unsigned bound_image_id; 433 unsigned bound_image_id;
433 bool dirty_image; 434 bool dirty_image;
434 GLenum texture_pool; 435 GLenum texture_pool;
435 GLint wrap_mode; 436 GLint wrap_mode;
436 bool lost; 437 bool lost;
437 TextureUsageHint hint; 438 TextureUsageHint hint;
438 ResourceType type; 439 ResourceType type;
439 ResourceFormat format; 440 ResourceFormat format;
440 bool has_shared_bitmap_id; 441 bool has_shared_bitmap_id;
442 bool allow_overlay;
441 SharedBitmapId shared_bitmap_id; 443 SharedBitmapId shared_bitmap_id;
442 SharedBitmap* shared_bitmap; 444 SharedBitmap* shared_bitmap;
443 linked_ptr<DirectRasterBuffer> direct_raster_buffer; 445 linked_ptr<DirectRasterBuffer> direct_raster_buffer;
444 linked_ptr<ImageRasterBuffer> image_raster_buffer; 446 linked_ptr<ImageRasterBuffer> image_raster_buffer;
445 linked_ptr<PixelRasterBuffer> pixel_raster_buffer; 447 linked_ptr<PixelRasterBuffer> pixel_raster_buffer;
446 }; 448 };
447 typedef base::hash_map<ResourceId, Resource> ResourceMap; 449 typedef base::hash_map<ResourceId, Resource> ResourceMap;
448 450
449 class RasterBuffer { 451 class RasterBuffer {
450 public: 452 public:
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 return format_gl_data_format[format]; 692 return format_gl_data_format[format];
691 } 693 }
692 694
693 inline GLenum GLInternalFormat(ResourceFormat format) { 695 inline GLenum GLInternalFormat(ResourceFormat format) {
694 return GLDataFormat(format); 696 return GLDataFormat(format);
695 } 697 }
696 698
697 } // namespace cc 699 } // namespace cc
698 700
699 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 701 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_
OLDNEW
« no previous file with comments | « cc/quads/render_pass_unittest.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698