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

Unified Diff: cc/resources/resource_provider.cc

Issue 207943002: cc: Reduce size of cc::ResourceProvider::Resource class (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase; conflict resolution; added missing initializer for bool added by other patch 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/resource_provider.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider.cc
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index 55dafbd47d20e36196a8924b800c97cbbc9191db..f0bc782158eee62dcf8f312357d04ce5f71c965e 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -210,29 +210,29 @@ ResourceProvider::Resource::Resource()
lock_for_read_count(0),
imported_count(0),
exported_count(0),
+ dirty_image(false),
locked_for_write(false),
- origin(Internal),
+ lost(false),
marked_for_deletion(false),
pending_set_pixels(false),
set_pixels_completion_forced(false),
allocated(false),
enable_read_lock_fences(false),
+ has_shared_bitmap_id(false),
+ allow_overlay(false),
read_lock_fence(NULL),
size(),
+ origin(Internal),
target(0),
original_filter(0),
filter(0),
image_id(0),
bound_image_id(0),
- dirty_image(false),
texture_pool(0),
wrap_mode(0),
- lost(false),
hint(TextureUsageAny),
type(InvalidType),
format(RGBA_8888),
- has_shared_bitmap_id(false),
- allow_overlay(false),
shared_bitmap(NULL) {}
ResourceProvider::Resource::~Resource() {}
@@ -255,28 +255,29 @@ ResourceProvider::Resource::Resource(GLuint texture_id,
lock_for_read_count(0),
imported_count(0),
exported_count(0),
+ dirty_image(false),
locked_for_write(false),
- origin(origin),
+ lost(false),
marked_for_deletion(false),
pending_set_pixels(false),
set_pixels_completion_forced(false),
allocated(false),
enable_read_lock_fences(false),
+ has_shared_bitmap_id(false),
+ allow_overlay(false),
read_lock_fence(NULL),
size(size),
+ origin(origin),
target(target),
original_filter(filter),
filter(filter),
image_id(0),
bound_image_id(0),
- dirty_image(false),
texture_pool(texture_pool),
wrap_mode(wrap_mode),
- lost(false),
hint(hint),
type(GLTexture),
format(format),
- has_shared_bitmap_id(false),
shared_bitmap(NULL) {
DCHECK(wrap_mode == GL_CLAMP_TO_EDGE || wrap_mode == GL_REPEAT);
DCHECK_EQ(origin == Internal, !!texture_pool);
@@ -297,28 +298,29 @@ ResourceProvider::Resource::Resource(uint8_t* pixels,
lock_for_read_count(0),
imported_count(0),
exported_count(0),
+ dirty_image(false),
locked_for_write(false),
- origin(origin),
+ lost(false),
marked_for_deletion(false),
pending_set_pixels(false),
set_pixels_completion_forced(false),
allocated(false),
enable_read_lock_fences(false),
+ has_shared_bitmap_id(!!bitmap),
+ allow_overlay(false),
read_lock_fence(NULL),
size(size),
+ origin(origin),
target(0),
original_filter(filter),
filter(filter),
image_id(0),
bound_image_id(0),
- dirty_image(false),
texture_pool(0),
wrap_mode(wrap_mode),
- lost(false),
hint(TextureUsageAny),
type(Bitmap),
format(RGBA_8888),
- has_shared_bitmap_id(!!bitmap),
shared_bitmap(bitmap) {
DCHECK(wrap_mode == GL_CLAMP_TO_EDGE || wrap_mode == GL_REPEAT);
DCHECK(origin == Delegated || pixels);
@@ -340,28 +342,29 @@ ResourceProvider::Resource::Resource(const SharedBitmapId& bitmap_id,
lock_for_read_count(0),
imported_count(0),
exported_count(0),
+ dirty_image(false),
locked_for_write(false),
- origin(origin),
+ lost(false),
marked_for_deletion(false),
pending_set_pixels(false),
set_pixels_completion_forced(false),
allocated(false),
enable_read_lock_fences(false),
+ has_shared_bitmap_id(true),
+ allow_overlay(false),
read_lock_fence(NULL),
size(size),
+ origin(origin),
target(0),
original_filter(filter),
filter(filter),
image_id(0),
bound_image_id(0),
- dirty_image(false),
texture_pool(0),
wrap_mode(wrap_mode),
- lost(false),
hint(TextureUsageAny),
type(Bitmap),
format(RGBA_8888),
- has_shared_bitmap_id(true),
shared_bitmap_id(bitmap_id),
shared_bitmap(NULL) {
DCHECK(wrap_mode == GL_CLAMP_TO_EDGE || wrap_mode == GL_REPEAT);
« no previous file with comments | « cc/resources/resource_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698