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

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

Issue 675903002: cc: SolidColorLayerImpl::AppendSolidQuads takes the visible content rect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed PictureLayerImplTest.DrawSolidQuads issue Created 6 years, 1 month 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/layers/picture_layer_impl_unittest.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 #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 #include <set> 9 #include <set>
10 10
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 if (pile_->is_solid_color()) { 162 if (pile_->is_solid_color()) {
163 PopulateSharedQuadState(shared_quad_state); 163 PopulateSharedQuadState(shared_quad_state);
164 164
165 AppendDebugBorderQuad( 165 AppendDebugBorderQuad(
166 render_pass, content_bounds(), shared_quad_state, append_quads_data); 166 render_pass, content_bounds(), shared_quad_state, append_quads_data);
167 167
168 SolidColorLayerImpl::AppendSolidQuads(render_pass, 168 SolidColorLayerImpl::AppendSolidQuads(render_pass,
169 occlusion_in_content_space, 169 occlusion_in_content_space,
170 shared_quad_state, 170 shared_quad_state,
171 content_bounds(), 171 visible_content_rect(),
172 pile_->solid_color(), 172 pile_->solid_color(),
173 append_quads_data); 173 append_quads_data);
174 return; 174 return;
175 } 175 }
176 176
177 float max_contents_scale = MaximumTilingContentsScale(); 177 float max_contents_scale = MaximumTilingContentsScale();
178 gfx::Transform scaled_draw_transform = draw_transform(); 178 gfx::Transform scaled_draw_transform = draw_transform();
179 scaled_draw_transform.Scale(SK_MScalar1 / max_contents_scale, 179 scaled_draw_transform.Scale(SK_MScalar1 / max_contents_scale,
180 SK_MScalar1 / max_contents_scale); 180 SK_MScalar1 / max_contents_scale);
181 gfx::Size scaled_content_bounds = 181 gfx::Size scaled_content_bounds =
(...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); 1685 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange();
1686 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; 1686 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start;
1687 return tiling_range.end - 1 - current_tiling_range_offset; 1687 return tiling_range.end - 1 - current_tiling_range_offset;
1688 } 1688 }
1689 } 1689 }
1690 NOTREACHED(); 1690 NOTREACHED();
1691 return 0; 1691 return 0;
1692 } 1692 }
1693 1693
1694 } // namespace cc 1694 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698