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

Side by Side Diff: cc/tile.h

Issue 12316084: cc: Consolidate the analysis_canvas operations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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_TILE_H_ 5 #ifndef CC_TILE_H_
6 #define CC_TILE_H_ 6 #define CC_TILE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // Returns 0 if not drawable. 54 // Returns 0 if not drawable.
55 ResourceProvider::ResourceId GetResourceId() const { 55 ResourceProvider::ResourceId GetResourceId() const {
56 if (!managed_state_.resource) 56 if (!managed_state_.resource)
57 return 0; 57 return 0;
58 if (managed_state_.resource_is_being_initialized) 58 if (managed_state_.resource_is_being_initialized)
59 return 0; 59 return 0;
60 60
61 return managed_state_.resource->id(); 61 return managed_state_.resource->id();
62 } 62 }
63 63
64 bool IsReadyToDraw() const;
65
66 bool is_solid_color() const {
67 return managed_state_.picture_pile_analysis.is_solid_color;
68 }
69
70 bool is_transparent() const {
71 return managed_state_.picture_pile_analysis.is_transparent;
72 }
73
74 SkColor get_solid_color() const {
Sami 2013/03/06 11:14:49 Nit: drop the "get_".
75 DCHECK(managed_state_.picture_pile_analysis.is_solid_color);
76 return managed_state_.picture_pile_analysis.solid_color;
77 }
78
64 const gfx::Rect& opaque_rect() const { return opaque_rect_; } 79 const gfx::Rect& opaque_rect() const { return opaque_rect_; }
65 80
66 bool contents_swizzled() const { return managed_state_.contents_swizzled; } 81 bool contents_swizzled() const { return managed_state_.contents_swizzled; }
67 82
68 float contents_scale() const { return contents_scale_; } 83 float contents_scale() const { return contents_scale_; }
69 gfx::Rect content_rect() const { return content_rect_; } 84 gfx::Rect content_rect() const { return content_rect_; }
70 85
71 int layer_id() const { return layer_id_; } 86 int layer_id() const { return layer_id_; }
72 87
73 void set_picture_pile(scoped_refptr<PicturePileImpl> pile) { 88 void set_picture_pile(scoped_refptr<PicturePileImpl> pile) {
(...skipping 29 matching lines...) Expand all
103 gfx::Rect opaque_rect_; 118 gfx::Rect opaque_rect_;
104 119
105 TilePriority priority_[NUM_BIN_PRIORITIES]; 120 TilePriority priority_[NUM_BIN_PRIORITIES];
106 ManagedTileState managed_state_; 121 ManagedTileState managed_state_;
107 int layer_id_; 122 int layer_id_;
108 }; 123 };
109 124
110 } // namespace cc 125 } // namespace cc
111 126
112 #endif // CC_TILE_H_ 127 #endif // CC_TILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698