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

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

Issue 733773005: cc: GPU rasterize tiles synchronously in PrepareToDraw (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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
« no previous file with comments | « cc/resources/gpu_rasterizer.cc ('k') | cc/resources/tile_manager.h » ('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_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 "cc/base/ref_counted_managed.h" 9 #include "cc/base/ref_counted_managed.h"
10 #include "cc/resources/managed_tile_state.h" 10 #include "cc/resources/managed_tile_state.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 ManagedTileState::DrawInfo& draw_info() { return managed_state_.draw_info; } 116 ManagedTileState::DrawInfo& draw_info() { return managed_state_.draw_info; }
117 117
118 float contents_scale() const { return contents_scale_; } 118 float contents_scale() const { return contents_scale_; }
119 gfx::Rect content_rect() const { return content_rect_; } 119 gfx::Rect content_rect() const { return content_rect_; }
120 120
121 int layer_id() const { return layer_id_; } 121 int layer_id() const { return layer_id_; }
122 122
123 int source_frame_number() const { return source_frame_number_; } 123 int source_frame_number() const { return source_frame_number_; }
124 124
125 TileResolution resolution() const { return managed_state_.resolution; }
126
125 void set_raster_source(scoped_refptr<RasterSource> raster_source) { 127 void set_raster_source(scoped_refptr<RasterSource> raster_source) {
126 DCHECK(raster_source->CoversRect(content_rect_, contents_scale_)) 128 DCHECK(raster_source->CoversRect(content_rect_, contents_scale_))
127 << "Recording rect: " 129 << "Recording rect: "
128 << gfx::ScaleToEnclosingRect(content_rect_, 1.f / contents_scale_) 130 << gfx::ScaleToEnclosingRect(content_rect_, 1.f / contents_scale_)
129 .ToString(); 131 .ToString();
130 raster_source_ = raster_source; 132 raster_source_ = raster_source;
131 } 133 }
132 134
133 size_t GPUMemoryUsageInBytes() const; 135 size_t GPUMemoryUsageInBytes() const;
134 136
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 186
185 Id id_; 187 Id id_;
186 static Id s_next_id_; 188 static Id s_next_id_;
187 189
188 DISALLOW_COPY_AND_ASSIGN(Tile); 190 DISALLOW_COPY_AND_ASSIGN(Tile);
189 }; 191 };
190 192
191 } // namespace cc 193 } // namespace cc
192 194
193 #endif // CC_RESOURCES_TILE_H_ 195 #endif // CC_RESOURCES_TILE_H_
OLDNEW
« no previous file with comments | « cc/resources/gpu_rasterizer.cc ('k') | cc/resources/tile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698