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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 926023003: cc: Fix bug in generating picture layer pairs from 2 lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layerlistbug: . Created 5 years, 10 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/test/fake_picture_layer_impl.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 !twin_layer->HasValidTilePriorities()) { 1231 !twin_layer->HasValidTilePriorities()) {
1232 twin_layer = nullptr; 1232 twin_layer = nullptr;
1233 } 1233 }
1234 layer_pairs->push_back(PictureLayerImpl::Pair(layer, twin_layer)); 1234 layer_pairs->push_back(PictureLayerImpl::Pair(layer, twin_layer));
1235 } 1235 }
1236 1236
1237 if (pending_tree_) { 1237 if (pending_tree_) {
1238 for (auto& layer : pending_tree_->picture_layers()) { 1238 for (auto& layer : pending_tree_->picture_layers()) {
1239 if (need_valid_tile_priorities && !layer->HasValidTilePriorities()) 1239 if (need_valid_tile_priorities && !layer->HasValidTilePriorities())
1240 continue; 1240 continue;
1241 if (layer->GetPendingOrActiveTwinLayer()) { 1241 if (PictureLayerImpl* twin_layer = layer->GetPendingOrActiveTwinLayer()) {
1242 // Already captured from the active tree. 1242 if (!need_valid_tile_priorities ||
1243 continue; 1243 twin_layer->HasValidTilePriorities()) {
1244 // Already captured from the active tree.
1245 continue;
1246 }
1244 } 1247 }
1245 layer_pairs->push_back(PictureLayerImpl::Pair(nullptr, layer)); 1248 layer_pairs->push_back(PictureLayerImpl::Pair(nullptr, layer));
1246 } 1249 }
1247 } 1250 }
1248 } 1251 }
1249 1252
1250 scoped_ptr<RasterTilePriorityQueue> LayerTreeHostImpl::BuildRasterQueue( 1253 scoped_ptr<RasterTilePriorityQueue> LayerTreeHostImpl::BuildRasterQueue(
1251 TreePriority tree_priority, 1254 TreePriority tree_priority,
1252 RasterTilePriorityQueue::Type type) { 1255 RasterTilePriorityQueue::Type type) {
1253 TRACE_EVENT0("cc", "LayerTreeHostImpl::BuildRasterQueue"); 1256 TRACE_EVENT0("cc", "LayerTreeHostImpl::BuildRasterQueue");
(...skipping 2251 matching lines...) Expand 10 before | Expand all | Expand 10 after
3505 (*it)->OnSetNeedsRedrawOnImpl(); 3508 (*it)->OnSetNeedsRedrawOnImpl();
3506 } 3509 }
3507 3510
3508 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfForwardingToMainThread() { 3511 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfForwardingToMainThread() {
3509 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); 3512 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin();
3510 for (; it != swap_promise_monitor_.end(); it++) 3513 for (; it != swap_promise_monitor_.end(); it++)
3511 (*it)->OnForwardScrollUpdateToMainThreadOnImpl(); 3514 (*it)->OnForwardScrollUpdateToMainThreadOnImpl();
3512 } 3515 }
3513 3516
3514 } // namespace cc 3517 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_picture_layer_impl.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698