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

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: viewporttrace: . 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_EVENT_INSTANT2("cc", "LayerTreeHostImpl::SetViewportSize",
2202 TRACE_EVENT_SCOPE_THREAD, "width",
2203 device_viewport_size.width(), "height",
2204 device_viewport_size.height());
2201 2205
2202 if (pending_tree_) 2206 if (pending_tree_)
2203 active_tree_->SetViewportSizeInvalid(); 2207 active_tree_->SetViewportSizeInvalid();
2204 2208
2205 device_viewport_size_ = device_viewport_size; 2209 device_viewport_size_ = device_viewport_size;
2206 2210
2207 UpdateViewportContainerSizes(); 2211 UpdateViewportContainerSizes();
2208 client_->OnCanDrawStateChanged(CanDraw()); 2212 client_->OnCanDrawStateChanged(CanDraw());
2209 SetFullRootLayerDamage(); 2213 SetFullRootLayerDamage();
2210 active_tree_->set_needs_update_draw_properties(); 2214 active_tree_->set_needs_update_draw_properties();
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after
3479 } 3483 }
3480 3484
3481 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3485 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3482 std::vector<PictureLayerImpl*>::iterator it = 3486 std::vector<PictureLayerImpl*>::iterator it =
3483 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3487 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3484 DCHECK(it != picture_layers_.end()); 3488 DCHECK(it != picture_layers_.end());
3485 picture_layers_.erase(it); 3489 picture_layers_.erase(it);
3486 } 3490 }
3487 3491
3488 } // namespace cc 3492 } // 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