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

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

Issue 69343005: Added preliminary support for tile rasterization with Ganesh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for tests that pass NULL resource_provider/context_provider. Created 7 years 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
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_TILE_H_ 5 #ifndef CC_RESOURCES_TILE_H_
6 #define CC_RESOURCES_TILE_H_ 6 #define CC_RESOURCES_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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 void set_can_use_lcd_text(bool can_use_lcd_text) { 55 void set_can_use_lcd_text(bool can_use_lcd_text) {
56 can_use_lcd_text_ = can_use_lcd_text; 56 can_use_lcd_text_ = can_use_lcd_text;
57 } 57 }
58 58
59 bool can_use_lcd_text() const { 59 bool can_use_lcd_text() const {
60 return can_use_lcd_text_; 60 return can_use_lcd_text_;
61 } 61 }
62 62
63 bool use_gpu_rasterizer() const {
nduca 2013/12/02 19:50:17 should this be mutable?
slavi 2013/12/04 02:06:50 Done.
64 return use_gpu_rasterizer_;
65 }
66
63 scoped_ptr<base::Value> AsValue() const; 67 scoped_ptr<base::Value> AsValue() const;
64 68
65 inline bool IsReadyToDraw() const { 69 inline bool IsReadyToDraw() const {
66 for (int mode = 0; mode < NUM_RASTER_MODES; ++mode) { 70 for (int mode = 0; mode < NUM_RASTER_MODES; ++mode) {
67 if (managed_state_.tile_versions[mode].IsReadyToDraw()) 71 if (managed_state_.tile_versions[mode].IsReadyToDraw())
68 return true; 72 return true;
69 } 73 }
70 return false; 74 return false;
71 } 75 }
72 76
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 119
116 // Methods called by by tile manager. 120 // Methods called by by tile manager.
117 Tile(TileManager* tile_manager, 121 Tile(TileManager* tile_manager,
118 PicturePileImpl* picture_pile, 122 PicturePileImpl* picture_pile,
119 gfx::Size tile_size, 123 gfx::Size tile_size,
120 gfx::Rect content_rect, 124 gfx::Rect content_rect,
121 gfx::Rect opaque_rect, 125 gfx::Rect opaque_rect,
122 float contents_scale, 126 float contents_scale,
123 int layer_id, 127 int layer_id,
124 int source_frame_number, 128 int source_frame_number,
125 bool can_use_lcd_text); 129 bool can_use_lcd_text,
130 bool use_gpu_rasterizer);
nduca 2013/12/02 19:50:17 this is unreadable in the call sites. new Tile (..
slavi 2013/12/04 02:06:50 Done.
126 ~Tile(); 131 ~Tile();
127 132
128 ManagedTileState& managed_state() { return managed_state_; } 133 ManagedTileState& managed_state() { return managed_state_; }
129 const ManagedTileState& managed_state() const { return managed_state_; } 134 const ManagedTileState& managed_state() const { return managed_state_; }
130 135
131 TileManager* tile_manager_; 136 TileManager* tile_manager_;
132 scoped_refptr<PicturePileImpl> picture_pile_; 137 scoped_refptr<PicturePileImpl> picture_pile_;
133 gfx::Rect tile_size_; 138 gfx::Rect tile_size_;
134 gfx::Rect content_rect_; 139 gfx::Rect content_rect_;
135 float contents_scale_; 140 float contents_scale_;
136 gfx::Rect opaque_rect_; 141 gfx::Rect opaque_rect_;
137 142
138 TilePriority priority_[NUM_TREES]; 143 TilePriority priority_[NUM_TREES];
139 ManagedTileState managed_state_; 144 ManagedTileState managed_state_;
140 int layer_id_; 145 int layer_id_;
141 int source_frame_number_; 146 int source_frame_number_;
142 bool can_use_lcd_text_; 147 bool can_use_lcd_text_;
148 bool use_gpu_rasterizer_;
143 149
144 Id id_; 150 Id id_;
145 static Id s_next_id_; 151 static Id s_next_id_;
146 152
147 DISALLOW_COPY_AND_ASSIGN(Tile); 153 DISALLOW_COPY_AND_ASSIGN(Tile);
148 }; 154 };
149 155
150 } // namespace cc 156 } // namespace cc
151 157
152 #endif // CC_RESOURCES_TILE_H_ 158 #endif // CC_RESOURCES_TILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698