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

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

Issue 606733003: DO NOT SUBMIT: test member initializers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 const gfx::Size& size, 393 const gfx::Size& size,
394 Origin origin, 394 Origin origin,
395 GLenum filter, 395 GLenum filter,
396 GLint wrap_mode); 396 GLint wrap_mode);
397 Resource(const SharedBitmapId& bitmap_id, 397 Resource(const SharedBitmapId& bitmap_id,
398 const gfx::Size& size, 398 const gfx::Size& size,
399 Origin origin, 399 Origin origin,
400 GLenum filter, 400 GLenum filter,
401 GLint wrap_mode); 401 GLint wrap_mode);
402 402
403 int child_id; 403 int child_id = 0;
404 unsigned gl_id; 404 unsigned gl_id = 0;
405 // Pixel buffer used for set pixels without unnecessary copying. 405 // Pixel buffer used for set pixels without unnecessary copying.
406 unsigned gl_pixel_buffer_id; 406 unsigned gl_pixel_buffer_id = 0;
407 // Query used to determine when asynchronous set pixels complete. 407 // Query used to determine when asynchronous set pixels complete.
408 unsigned gl_upload_query_id; 408 unsigned gl_upload_query_id = 0;
409 // Query used to determine when read lock fence has passed. 409 // Query used to determine when read lock fence has passed.
410 unsigned gl_read_lock_query_id; 410 unsigned gl_read_lock_query_id = 0;
411 TextureMailbox mailbox; 411 TextureMailbox mailbox;
412 ReleaseCallbackImpl release_callback_impl; 412 ReleaseCallbackImpl release_callback_impl;
413 uint8_t* pixels; 413 uint8_t* pixels = nullptr;
414 int lock_for_read_count; 414 int lock_for_read_count = 0;
415 int imported_count; 415 int imported_count = 0;
416 int exported_count; 416 int exported_count = 0;
417 bool dirty_image : 1; 417 bool dirty_image : 1;
418 bool locked_for_write : 1; 418 bool locked_for_write : 1;
419 bool lost : 1; 419 bool lost : 1;
420 bool marked_for_deletion : 1; 420 bool marked_for_deletion : 1;
421 bool pending_set_pixels : 1; 421 bool pending_set_pixels : 1;
422 bool set_pixels_completion_forced : 1; 422 bool set_pixels_completion_forced : 1;
423 bool allocated : 1; 423 bool allocated : 1;
424 bool read_lock_fences_enabled : 1; 424 bool read_lock_fences_enabled : 1;
425 bool has_shared_bitmap_id : 1; 425 bool has_shared_bitmap_id : 1;
426 bool allow_overlay : 1; 426 bool allow_overlay : 1;
427 scoped_refptr<Fence> read_lock_fence; 427 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
428 gfx::Size size; 428 gfx::Size size;
429 Origin origin; 429 Origin origin;
430 GLenum target; 430 GLenum target = 0;
431 // TODO(skyostil): Use a separate sampler object for filter state. 431 // TODO(skyostil): Use a separate sampler object for filter state.
432 GLenum original_filter; 432 GLenum original_filter = 0;
433 GLenum filter; 433 GLenum filter = 0;
434 unsigned image_id; 434 unsigned image_id = 0;
435 unsigned bound_image_id; 435 unsigned bound_image_id = 0;
436 GLenum texture_pool; 436 GLenum texture_pool = 0;
437 GLint wrap_mode; 437 GLint wrap_mode = 0;
438 TextureHint hint; 438 TextureHint hint;
439 ResourceType type; 439 ResourceType type;
440 ResourceFormat format; 440 ResourceFormat format;
441 SharedBitmapId shared_bitmap_id; 441 SharedBitmapId shared_bitmap_id;
442 SharedBitmap* shared_bitmap; 442 SharedBitmap* shared_bitmap = nullptr;
443 skia::RefPtr<SkSurface> sk_surface; 443 skia::RefPtr<SkSurface> sk_surface;
444 }; 444 };
445 typedef base::hash_map<ResourceId, Resource> ResourceMap; 445 typedef base::hash_map<ResourceId, Resource> ResourceMap;
446 446
447 static bool CompareResourceMapIteratorsByChildId( 447 static bool CompareResourceMapIteratorsByChildId(
448 const std::pair<ReturnedResource, ResourceMap::iterator>& a, 448 const std::pair<ReturnedResource, ResourceMap::iterator>& a,
449 const std::pair<ReturnedResource, ResourceMap::iterator>& b); 449 const std::pair<ReturnedResource, ResourceMap::iterator>& b);
450 450
451 struct Child { 451 struct Child {
452 Child(); 452 Child();
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 return format_gl_data_format[format]; 588 return format_gl_data_format[format];
589 } 589 }
590 590
591 inline GLenum GLInternalFormat(ResourceFormat format) { 591 inline GLenum GLInternalFormat(ResourceFormat format) {
592 return GLDataFormat(format); 592 return GLDataFormat(format);
593 } 593 }
594 594
595 } // namespace cc 595 } // namespace cc
596 596
597 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 597 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698