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

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

Issue 2560723006: [2/5] Disable transformed rasterization if layer is opaque (Closed)
Patch Set: rebase Created 3 years, 8 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/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 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 AddDamageRect(layer_damage_rect); 652 AddDamageRect(layer_damage_rect);
653 } 653 }
654 if (tile->draw_info().NeedsRaster()) { 654 if (tile->draw_info().NeedsRaster()) {
655 PictureLayerTiling* tiling = 655 PictureLayerTiling* tiling =
656 tilings_->FindTilingWithScaleKey(tile->contents_scale()); 656 tilings_->FindTilingWithScaleKey(tile->contents_scale());
657 if (tiling) 657 if (tiling)
658 tiling->set_all_tiles_done(false); 658 tiling->set_all_tiles_done(false);
659 } 659 }
660 } 660 }
661 661
662 SimpleEnclosedRegion PictureLayerImpl::VisibleOpaqueRegion() const {
663 if (use_transformed_rasterization_)
664 return SimpleEnclosedRegion();
665 return LayerImpl::VisibleOpaqueRegion();
666 }
667
662 void PictureLayerImpl::DidBeginTracing() { 668 void PictureLayerImpl::DidBeginTracing() {
663 raster_source_->DidBeginTracing(); 669 raster_source_->DidBeginTracing();
664 } 670 }
665 671
666 void PictureLayerImpl::ReleaseResources() { 672 void PictureLayerImpl::ReleaseResources() {
667 // Recreate tilings with new settings, since some of those might change when 673 // Recreate tilings with new settings, since some of those might change when
668 // we release resources. 674 // we release resources.
669 tilings_ = nullptr; 675 tilings_ = nullptr;
670 ResetRasterScale(); 676 ResetRasterScale();
671 } 677 }
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
1402 } 1408 }
1403 1409
1404 invalidation_.Union(invalidation); 1410 invalidation_.Union(invalidation);
1405 tilings_->UpdateTilingsForImplSideInvalidation(invalidation); 1411 tilings_->UpdateTilingsForImplSideInvalidation(invalidation);
1406 SetNeedsPushProperties(); 1412 SetNeedsPushProperties();
1407 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages", 1413 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages",
1408 "Invalidation", invalidation.ToString()); 1414 "Invalidation", invalidation.ToString());
1409 } 1415 }
1410 1416
1411 } // namespace cc 1417 } // 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