Chromium Code Reviews| Index: cc/resources/resource_provider.h |
| diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h |
| index fc2fc5a9f4aec0e43d3fa0811233dea4fe47b322..c040d9ce954c47b3e46e3bfb17c3ea0499734875 100644 |
| --- a/cc/resources/resource_provider.h |
| +++ b/cc/resources/resource_provider.h |
| @@ -400,20 +400,20 @@ class CC_EXPORT ResourceProvider { |
| GLenum filter, |
| GLint wrap_mode); |
| - int child_id; |
| - unsigned gl_id; |
| + int child_id = 0; |
| + unsigned gl_id = 0; |
| // Pixel buffer used for set pixels without unnecessary copying. |
| - unsigned gl_pixel_buffer_id; |
| + unsigned gl_pixel_buffer_id = 0; |
| // Query used to determine when asynchronous set pixels complete. |
| - unsigned gl_upload_query_id; |
| + unsigned gl_upload_query_id = 0; |
| // Query used to determine when read lock fence has passed. |
| - unsigned gl_read_lock_query_id; |
| + unsigned gl_read_lock_query_id = 0; |
| TextureMailbox mailbox; |
| ReleaseCallbackImpl release_callback_impl; |
| - uint8_t* pixels; |
| - int lock_for_read_count; |
| - int imported_count; |
| - int exported_count; |
| + uint8_t* pixels = nullptr; |
| + int lock_for_read_count = 0; |
| + int imported_count = 0; |
| + int exported_count = 0; |
| bool dirty_image : 1; |
| bool locked_for_write : 1; |
| bool lost : 1; |
| @@ -424,22 +424,22 @@ class CC_EXPORT ResourceProvider { |
| bool read_lock_fences_enabled : 1; |
| bool has_shared_bitmap_id : 1; |
| bool allow_overlay : 1; |
| - scoped_refptr<Fence> read_lock_fence; |
| + scoped_refptr<Fence> read_lock_fence = nullptr; |
|
Alex Vakulenko (Google)
2014/09/25 18:06:51
It's a class with a default constructor, does it h
jamesr
2014/09/25 18:10:55
Yeah, this seems unnecessary.
jbroman
2014/09/25 18:18:34
Agreed. Only did this because the constructors pre
|
| gfx::Size size; |
| Origin origin; |
| - GLenum target; |
| + GLenum target = 0; |
| // TODO(skyostil): Use a separate sampler object for filter state. |
| - GLenum original_filter; |
| - GLenum filter; |
| - unsigned image_id; |
| - unsigned bound_image_id; |
| - GLenum texture_pool; |
| - GLint wrap_mode; |
| + GLenum original_filter = 0; |
| + GLenum filter = 0; |
| + unsigned image_id = 0; |
| + unsigned bound_image_id = 0; |
| + GLenum texture_pool = 0; |
| + GLint wrap_mode = 0; |
| TextureHint hint; |
| ResourceType type; |
| ResourceFormat format; |
| SharedBitmapId shared_bitmap_id; |
| - SharedBitmap* shared_bitmap; |
| + SharedBitmap* shared_bitmap = nullptr; |
| skia::RefPtr<SkSurface> sk_surface; |
| }; |
| typedef base::hash_map<ResourceId, Resource> ResourceMap; |