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

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

Issue 1848613002: Extract subpixel offsets from composited layer transforms when possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/playback/raster_source.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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 562
563 if (!can_have_tilings) { 563 if (!can_have_tilings) {
564 RemoveAllTilings(); 564 RemoveAllTilings();
565 return; 565 return;
566 } 566 }
567 567
568 // We could do this after doing UpdateTiles, which would avoid doing this for 568 // We could do this after doing UpdateTiles, which would avoid doing this for
569 // tilings that are going to disappear on the pending tree (if scale changed). 569 // tilings that are going to disappear on the pending tree (if scale changed).
570 // But that would also be more complicated, so we just do it here for now. 570 // But that would also be more complicated, so we just do it here for now.
571 if (pending_set) { 571 if (pending_set) {
572 LOG(ERROR) << "pending_set: " << raster_source_.get();
573
572 tilings_->UpdateTilingsToCurrentRasterSourceForActivation( 574 tilings_->UpdateTilingsToCurrentRasterSourceForActivation(
573 raster_source_, pending_set, invalidation_, MinimumContentsScale(), 575 raster_source_, pending_set, invalidation_, MinimumContentsScale(),
574 MaximumContentsScale()); 576 MaximumContentsScale());
575 } else { 577 } else {
578
579 LOG(ERROR) << "SetSubpixelOffset: " << raster_source_.get() << ": " << subpi xel_offset_.ToString() << ": " << raster_source_->GetSize().ToString();
580 LOG(ERROR) << "DrawsContent: " << DrawsContent();
581 raster_source_->SetSubpixelOffset(subpixel_offset_);
576 tilings_->UpdateTilingsToCurrentRasterSourceForCommit( 582 tilings_->UpdateTilingsToCurrentRasterSourceForCommit(
577 raster_source_, invalidation_, MinimumContentsScale(), 583 raster_source_, invalidation_, MinimumContentsScale(),
578 MaximumContentsScale()); 584 MaximumContentsScale());
579 } 585 }
580 } 586 }
581 587
582 void PictureLayerImpl::UpdateCanUseLCDTextAfterCommit() { 588 void PictureLayerImpl::UpdateCanUseLCDTextAfterCommit() {
583 // This function is only allowed to be called after commit, due to it not 589 // This function is only allowed to be called after commit, due to it not
584 // being smart about sharing tiles and because otherwise it would cause 590 // being smart about sharing tiles and because otherwise it would cause
585 // flashes by switching out tiles in place that may be currently on screen. 591 // flashes by switching out tiles in place that may be currently on screen.
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 1261
1256 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1262 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1257 return !layer_tree_impl()->IsRecycleTree(); 1263 return !layer_tree_impl()->IsRecycleTree();
1258 } 1264 }
1259 1265
1260 bool PictureLayerImpl::HasValidTilePriorities() const { 1266 bool PictureLayerImpl::HasValidTilePriorities() const {
1261 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); 1267 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
1262 } 1268 }
1263 1269
1264 } // namespace cc 1270 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/playback/raster_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698