| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |