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

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

Issue 864713004: cc: Trace the viewport size changing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | 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 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 2180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2191 CreateAndSetRenderer(); 2191 CreateAndSetRenderer();
2192 EnforceZeroBudget(true); 2192 EnforceZeroBudget(true);
2193 CreateAndSetTileManager(); 2193 CreateAndSetTileManager();
2194 2194
2195 client_->SetNeedsCommitOnImplThread(); 2195 client_->SetNeedsCommitOnImplThread();
2196 } 2196 }
2197 2197
2198 void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) { 2198 void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) {
2199 if (device_viewport_size == device_viewport_size_) 2199 if (device_viewport_size == device_viewport_size_)
2200 return; 2200 return;
2201 TRACE_EVENT2("cc", "LayerTreeHostImpl::SetViewportSize", "width",
enne (OOO) 2015/02/05 00:22:25 TRACE_EVENT_INSTANT_2?
danakj 2015/02/05 00:27:12 Oh, yes. Done.
2202 device_viewport_size.width(), "height",
2203 device_viewport_size.height());
2201 2204
2202 if (pending_tree_) 2205 if (pending_tree_)
2203 active_tree_->SetViewportSizeInvalid(); 2206 active_tree_->SetViewportSizeInvalid();
2204 2207
2205 device_viewport_size_ = device_viewport_size; 2208 device_viewport_size_ = device_viewport_size;
2206 2209
2207 UpdateViewportContainerSizes(); 2210 UpdateViewportContainerSizes();
2208 client_->OnCanDrawStateChanged(CanDraw()); 2211 client_->OnCanDrawStateChanged(CanDraw());
2209 SetFullRootLayerDamage(); 2212 SetFullRootLayerDamage();
2210 active_tree_->set_needs_update_draw_properties(); 2213 active_tree_->set_needs_update_draw_properties();
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after
3479 } 3482 }
3480 3483
3481 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3484 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3482 std::vector<PictureLayerImpl*>::iterator it = 3485 std::vector<PictureLayerImpl*>::iterator it =
3483 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3486 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3484 DCHECK(it != picture_layers_.end()); 3487 DCHECK(it != picture_layers_.end());
3485 picture_layers_.erase(it); 3488 picture_layers_.erase(it);
3486 } 3489 }
3487 3490
3488 } // namespace cc 3491 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698