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

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

Issue 897873005: Move LayerTreeHostImpl::SetVisible trace to "cc" from "webkit". (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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 private: 113 private:
114 LayerImpl* inner_; 114 LayerImpl* inner_;
115 LayerImpl* outer_; 115 LayerImpl* outer_;
116 gfx::ScrollOffset viewport_in_content_coordinates_; 116 gfx::ScrollOffset viewport_in_content_coordinates_;
117 }; 117 };
118 118
119 119
120 void DidVisibilityChange(LayerTreeHostImpl* id, bool visible) { 120 void DidVisibilityChange(LayerTreeHostImpl* id, bool visible) {
121 if (visible) { 121 if (visible) {
122 TRACE_EVENT_ASYNC_BEGIN1("webkit", 122 TRACE_EVENT_ASYNC_BEGIN1("cc", "LayerTreeHostImpl::SetVisible", id,
123 "LayerTreeHostImpl::SetVisible", 123 "LayerTreeHostImpl", id);
124 id,
125 "LayerTreeHostImpl",
126 id);
127 return; 124 return;
128 } 125 }
129 126
130 TRACE_EVENT_ASYNC_END0("webkit", "LayerTreeHostImpl::SetVisible", id); 127 TRACE_EVENT_ASYNC_END0("cc", "LayerTreeHostImpl::SetVisible", id);
131 } 128 }
132 129
133 size_t GetMaxTransferBufferUsageBytes( 130 size_t GetMaxTransferBufferUsageBytes(
134 const ContextProvider::Capabilities& context_capabilities, 131 const ContextProvider::Capabilities& context_capabilities,
135 double refresh_rate) { 132 double refresh_rate) {
136 // We want to make sure the default transfer buffer size is equal to the 133 // We want to make sure the default transfer buffer size is equal to the
137 // amount of data that can be uploaded by the compositor to avoid stalling 134 // amount of data that can be uploaded by the compositor to avoid stalling
138 // the pipeline. 135 // the pipeline.
139 // For reference Chromebook Pixel can upload 1MB in about 0.5ms. 136 // For reference Chromebook Pixel can upload 1MB in about 0.5ms.
140 const size_t kMaxBytesUploadedPerMs = 1024 * 1024 * 2; 137 const size_t kMaxBytesUploadedPerMs = 1024 * 1024 * 2;
(...skipping 3338 matching lines...) Expand 10 before | Expand all | Expand 10 after
3479 } 3476 }
3480 3477
3481 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3478 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3482 std::vector<PictureLayerImpl*>::iterator it = 3479 std::vector<PictureLayerImpl*>::iterator it =
3483 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3480 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3484 DCHECK(it != picture_layers_.end()); 3481 DCHECK(it != picture_layers_.end());
3485 picture_layers_.erase(it); 3482 picture_layers_.erase(it);
3486 } 3483 }
3487 3484
3488 } // namespace cc 3485 } // 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