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

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

Issue 1418273002: cc: Move draw params from SetExternalDrawConstraints to OnDraw (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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 #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 <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <set> 10 #include <set>
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 width); 255 width);
256 } 256 }
257 } 257 }
258 258
259 // Keep track of the tilings that were used so that tilings that are 259 // Keep track of the tilings that were used so that tilings that are
260 // unused can be considered for removal. 260 // unused can be considered for removal.
261 last_append_quads_tilings_.clear(); 261 last_append_quads_tilings_.clear();
262 262
263 // Ignore missing tiles outside of viewport for tile priority. This is 263 // Ignore missing tiles outside of viewport for tile priority. This is
264 // normally the same as draw viewport but can be independently overridden by 264 // normally the same as draw viewport but can be independently overridden by
265 // embedders like Android WebView with SetExternalDrawConstraints. 265 // embedders like Android WebView with SetExternalTilePriorityConstraints.
266 gfx::Rect scaled_viewport_for_tile_priority = gfx::ScaleToEnclosingRect( 266 gfx::Rect scaled_viewport_for_tile_priority = gfx::ScaleToEnclosingRect(
267 viewport_rect_for_tile_priority_in_content_space_, max_contents_scale); 267 viewport_rect_for_tile_priority_in_content_space_, max_contents_scale);
268 268
269 size_t missing_tile_count = 0u; 269 size_t missing_tile_count = 0u;
270 size_t on_demand_missing_tile_count = 0u; 270 size_t on_demand_missing_tile_count = 0u;
271 only_used_low_res_last_append_quads_ = true; 271 only_used_low_res_last_append_quads_ = true;
272 gfx::Rect scaled_recorded_viewport = gfx::ScaleToEnclosingRect( 272 gfx::Rect scaled_recorded_viewport = gfx::ScaleToEnclosingRect(
273 raster_source_->RecordedViewport(), max_contents_scale); 273 raster_source_->RecordedViewport(), max_contents_scale);
274 for (PictureLayerTilingSet::CoverageIterator iter( 274 for (PictureLayerTilingSet::CoverageIterator iter(
275 tilings_.get(), max_contents_scale, 275 tilings_.get(), max_contents_scale,
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 1240
1241 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1241 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1242 return !layer_tree_impl()->IsRecycleTree(); 1242 return !layer_tree_impl()->IsRecycleTree();
1243 } 1243 }
1244 1244
1245 bool PictureLayerImpl::HasValidTilePriorities() const { 1245 bool PictureLayerImpl::HasValidTilePriorities() const {
1246 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); 1246 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
1247 } 1247 }
1248 1248
1249 } // namespace cc 1249 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698