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

Side by Side Diff: cc/layers/picture_layer_impl.cc

Issue 341023003: cc: Pass scaled bounds to debug border quads for drawing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
« cc/layers/layer_impl.h ('K') | « cc/layers/layer_impl.cc ('k') | no next file » | 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 #include "cc/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 draw_properties().clip_rect, 157 draw_properties().clip_rect,
158 draw_properties().is_clipped, 158 draw_properties().is_clipped,
159 draw_properties().opacity, 159 draw_properties().opacity,
160 blend_mode()); 160 blend_mode());
161 161
162 gfx::Rect rect = scaled_visible_content_rect; 162 gfx::Rect rect = scaled_visible_content_rect;
163 163
164 if (current_draw_mode_ == DRAW_MODE_RESOURCELESS_SOFTWARE) { 164 if (current_draw_mode_ == DRAW_MODE_RESOURCELESS_SOFTWARE) {
165 AppendDebugBorderQuad( 165 AppendDebugBorderQuad(
166 quad_sink, 166 quad_sink,
167 scaled_content_bounds,
167 shared_quad_state, 168 shared_quad_state,
168 append_quads_data, 169 append_quads_data,
169 DebugColors::DirectPictureBorderColor(), 170 DebugColors::DirectPictureBorderColor(),
170 DebugColors::DirectPictureBorderWidth(layer_tree_impl())); 171 DebugColors::DirectPictureBorderWidth(layer_tree_impl()));
171 172
172 gfx::Rect geometry_rect = rect; 173 gfx::Rect geometry_rect = rect;
173 gfx::Rect opaque_rect = contents_opaque() ? geometry_rect : gfx::Rect(); 174 gfx::Rect opaque_rect = contents_opaque() ? geometry_rect : gfx::Rect();
174 gfx::Rect visible_geometry_rect = 175 gfx::Rect visible_geometry_rect =
175 quad_sink->UnoccludedContentRect(geometry_rect, draw_transform()); 176 quad_sink->UnoccludedContentRect(geometry_rect, draw_transform());
176 if (visible_geometry_rect.IsEmpty()) 177 if (visible_geometry_rect.IsEmpty())
(...skipping 12 matching lines...) Expand all
189 texture_size, 190 texture_size,
190 RGBA_8888, 191 RGBA_8888,
191 quad_content_rect, 192 quad_content_rect,
192 max_contents_scale, 193 max_contents_scale,
193 pile_); 194 pile_);
194 quad_sink->Append(quad.PassAs<DrawQuad>()); 195 quad_sink->Append(quad.PassAs<DrawQuad>());
195 append_quads_data->num_missing_tiles++; 196 append_quads_data->num_missing_tiles++;
196 return; 197 return;
197 } 198 }
198 199
199 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data); 200 AppendDebugBorderQuad(
201 quad_sink, scaled_content_bounds, shared_quad_state, append_quads_data);
200 202
201 if (ShowDebugBorders()) { 203 if (ShowDebugBorders()) {
202 for (PictureLayerTilingSet::CoverageIterator iter( 204 for (PictureLayerTilingSet::CoverageIterator iter(
203 tilings_.get(), max_contents_scale, rect, ideal_contents_scale_); 205 tilings_.get(), max_contents_scale, rect, ideal_contents_scale_);
204 iter; 206 iter;
205 ++iter) { 207 ++iter) {
206 SkColor color; 208 SkColor color;
207 float width; 209 float width;
208 if (*iter && iter->IsReadyToDraw()) { 210 if (*iter && iter->IsReadyToDraw()) {
209 ManagedTileState::TileVersion::Mode mode = 211 ManagedTileState::TileVersion::Mode mode =
(...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 return iterator_index_ < iterators_.size(); 1639 return iterator_index_ < iterators_.size();
1638 } 1640 }
1639 1641
1640 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( 1642 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType(
1641 PictureLayerTiling::TilingEvictionTileIterator* it) const { 1643 PictureLayerTiling::TilingEvictionTileIterator* it) const {
1642 return it->get_type() == iteration_stage_ && 1644 return it->get_type() == iteration_stage_ &&
1643 (**it)->required_for_activation() == required_for_activation_; 1645 (**it)->required_for_activation() == required_for_activation_;
1644 } 1646 }
1645 1647
1646 } // namespace cc 1648 } // namespace cc
OLDNEW
« cc/layers/layer_impl.h ('K') | « cc/layers/layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698