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

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

Issue 2560723006: [2/5] Disable transformed rasterization if layer is opaque (Closed)
Patch Set: Created 4 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
« cc/layers/picture_layer.cc ('K') | « cc/layers/picture_layer_impl.h ('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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 AddDamageRect(layer_damage_rect); 655 AddDamageRect(layer_damage_rect);
656 } 656 }
657 if (tile->draw_info().NeedsRaster()) { 657 if (tile->draw_info().NeedsRaster()) {
658 PictureLayerTiling* tiling = 658 PictureLayerTiling* tiling =
659 tilings_->FindTilingWithScaleKey(tile->contents_scale_key()); 659 tilings_->FindTilingWithScaleKey(tile->contents_scale_key());
660 if (tiling) 660 if (tiling)
661 tiling->set_all_tiles_done(false); 661 tiling->set_all_tiles_done(false);
662 } 662 }
663 } 663 }
664 664
665 SimpleEnclosedRegion PictureLayerImpl::VisibleOpaqueRegion() const {
666 if (use_transformed_rasterization_)
667 return SimpleEnclosedRegion();
enne (OOO) 2017/01/03 22:53:08 Why not VisibleOpaqueRegion but Inset by 1?
trchen 2017/01/14 00:46:46 Because it depends on the actual raster scale. For
668 return LayerImpl::VisibleOpaqueRegion();
669 }
670
665 void PictureLayerImpl::DidBeginTracing() { 671 void PictureLayerImpl::DidBeginTracing() {
666 raster_source_->DidBeginTracing(); 672 raster_source_->DidBeginTracing();
667 } 673 }
668 674
669 void PictureLayerImpl::ReleaseResources() { 675 void PictureLayerImpl::ReleaseResources() {
670 // Recreate tilings with new settings, since some of those might change when 676 // Recreate tilings with new settings, since some of those might change when
671 // we release resources. 677 // we release resources.
672 tilings_ = nullptr; 678 tilings_ = nullptr;
673 ResetRasterScale(); 679 ResetRasterScale();
674 } 680 }
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1358 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1353 return !layer_tree_impl()->IsRecycleTree(); 1359 return !layer_tree_impl()->IsRecycleTree();
1354 } 1360 }
1355 1361
1356 bool PictureLayerImpl::HasValidTilePriorities() const { 1362 bool PictureLayerImpl::HasValidTilePriorities() const {
1357 return IsOnActiveOrPendingTree() && 1363 return IsOnActiveOrPendingTree() &&
1358 is_drawn_render_surface_layer_list_member(); 1364 is_drawn_render_surface_layer_list_member();
1359 } 1365 }
1360 1366
1361 } // namespace cc 1367 } // namespace cc
OLDNEW
« cc/layers/picture_layer.cc ('K') | « cc/layers/picture_layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698