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

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

Issue 2838033002: cc : Don't draw animating layers with singular screen space transform (Closed)
Patch Set: . Created 3 years, 7 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
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/trees/draw_property_utils.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 #include "cc/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 WhichTree PictureLayerImpl::GetTree() const { 1386 WhichTree PictureLayerImpl::GetTree() const {
1387 return layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE; 1387 return layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE;
1388 } 1388 }
1389 1389
1390 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1390 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1391 return !layer_tree_impl()->IsRecycleTree(); 1391 return !layer_tree_impl()->IsRecycleTree();
1392 } 1392 }
1393 1393
1394 bool PictureLayerImpl::HasValidTilePriorities() const { 1394 bool PictureLayerImpl::HasValidTilePriorities() const {
1395 return IsOnActiveOrPendingTree() && 1395 return IsOnActiveOrPendingTree() &&
1396 is_drawn_render_surface_layer_list_member(); 1396 (is_drawn_render_surface_layer_list_member() ||
1397 raster_even_if_not_in_rsll());
1397 } 1398 }
1398 1399
1399 void PictureLayerImpl::InvalidateRegionForImages( 1400 void PictureLayerImpl::InvalidateRegionForImages(
1400 const ImageIdFlatSet& images_to_invalidate) { 1401 const ImageIdFlatSet& images_to_invalidate) {
1401 TRACE_EVENT_BEGIN0("cc", "PictureLayerImpl::InvalidateRegionForImages"); 1402 TRACE_EVENT_BEGIN0("cc", "PictureLayerImpl::InvalidateRegionForImages");
1402 1403
1403 InvalidationRegion image_invalidation; 1404 InvalidationRegion image_invalidation;
1404 for (auto image_id : images_to_invalidate) 1405 for (auto image_id : images_to_invalidate)
1405 image_invalidation.Union(raster_source_->GetRectForImage(image_id)); 1406 image_invalidation.Union(raster_source_->GetRectForImage(image_id));
1406 Region invalidation; 1407 Region invalidation;
1407 image_invalidation.Swap(&invalidation); 1408 image_invalidation.Swap(&invalidation);
1408 1409
1409 if (invalidation.IsEmpty()) { 1410 if (invalidation.IsEmpty()) {
1410 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages", 1411 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages",
1411 "Invalidation", invalidation.ToString()); 1412 "Invalidation", invalidation.ToString());
1412 return; 1413 return;
1413 } 1414 }
1414 1415
1415 invalidation_.Union(invalidation); 1416 invalidation_.Union(invalidation);
1416 tilings_->UpdateTilingsForImplSideInvalidation(invalidation); 1417 tilings_->UpdateTilingsForImplSideInvalidation(invalidation);
1417 SetNeedsPushProperties(); 1418 SetNeedsPushProperties();
1418 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages", 1419 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages",
1419 "Invalidation", invalidation.ToString()); 1420 "Invalidation", invalidation.ToString());
1420 } 1421 }
1421 1422
1422 } // namespace cc 1423 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/trees/draw_property_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698