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

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

Issue 51653008: Remove WGC3D::isContextLost references from cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 1 month 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 | Annotate | Revision Log
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.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 #include <string> 9 #include <string>
10 10
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 // value, then the layer can early out without needing a full commit. 1104 // value, then the layer can early out without needing a full commit.
1105 if (root_scroll_layer) { 1105 if (root_scroll_layer) {
1106 root_scroll_layer->SetScrollOffsetFromImplSide( 1106 root_scroll_layer->SetScrollOffsetFromImplSide(
1107 root_scroll_layer->scroll_offset() + root_scroll_delta); 1107 root_scroll_layer->scroll_offset() + root_scroll_delta);
1108 } 1108 }
1109 ApplyPageScaleDeltaFromImplSide(info.page_scale_delta); 1109 ApplyPageScaleDeltaFromImplSide(info.page_scale_delta);
1110 client_->ApplyScrollAndScale(root_scroll_delta, info.page_scale_delta); 1110 client_->ApplyScrollAndScale(root_scroll_delta, info.page_scale_delta);
1111 } 1111 }
1112 } 1112 }
1113 1113
1114 void LayerTreeHost::StartRateLimiter(WebKit::WebGraphicsContext3D* context3d) { 1114 void LayerTreeHost::StartRateLimiter(TextureLayerClient* client) {
1115 if (animating_) 1115 if (animating_)
1116 return; 1116 return;
1117 1117
1118 DCHECK(context3d); 1118 DCHECK(client);
1119 RateLimiterMap::iterator it = rate_limiters_.find(context3d); 1119 RateLimiterMap::iterator it = rate_limiters_.find(client);
piman 2013/11/01 23:15:35 Skia only had one context for all canvas, so it ha
1120 if (it != rate_limiters_.end()) { 1120 if (it != rate_limiters_.end()) {
1121 it->second->Start(); 1121 it->second->Start();
1122 } else { 1122 } else {
1123 scoped_refptr<RateLimiter> rate_limiter = 1123 scoped_refptr<RateLimiter> rate_limiter =
1124 RateLimiter::Create(context3d, this, proxy_->MainThreadTaskRunner()); 1124 RateLimiter::Create(client, this, proxy_->MainThreadTaskRunner());
1125 rate_limiters_[context3d] = rate_limiter; 1125 rate_limiters_[client] = rate_limiter;
1126 rate_limiter->Start(); 1126 rate_limiter->Start();
1127 } 1127 }
1128 } 1128 }
1129 1129
1130 void LayerTreeHost::StopRateLimiter(WebKit::WebGraphicsContext3D* context3d) { 1130 void LayerTreeHost::StopRateLimiter(TextureLayerClient* client) {
1131 RateLimiterMap::iterator it = rate_limiters_.find(context3d); 1131 RateLimiterMap::iterator it = rate_limiters_.find(client);
1132 if (it != rate_limiters_.end()) { 1132 if (it != rate_limiters_.end()) {
1133 it->second->Stop(); 1133 it->second->Stop();
1134 rate_limiters_.erase(it); 1134 rate_limiters_.erase(it);
1135 } 1135 }
1136 } 1136 }
1137 1137
1138 void LayerTreeHost::RateLimit() { 1138 void LayerTreeHost::RateLimit() {
1139 // Force a no-op command on the compositor context, so that any ratelimiting 1139 // Force a no-op command on the compositor context, so that any ratelimiting
1140 // commands will wait for the compositing context, and therefore for the 1140 // commands will wait for the compositing context, and therefore for the
1141 // SwapBuffers. 1141 // SwapBuffers.
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 1284
1285 bool LayerTreeHost::ScheduleMicroBenchmark( 1285 bool LayerTreeHost::ScheduleMicroBenchmark(
1286 const std::string& benchmark_name, 1286 const std::string& benchmark_name,
1287 scoped_ptr<base::Value> value, 1287 scoped_ptr<base::Value> value,
1288 const MicroBenchmark::DoneCallback& callback) { 1288 const MicroBenchmark::DoneCallback& callback) {
1289 return micro_benchmark_controller_.ScheduleRun( 1289 return micro_benchmark_controller_.ScheduleRun(
1290 benchmark_name, value.Pass(), callback); 1290 benchmark_name, value.Pass(), callback);
1291 } 1291 }
1292 1292
1293 } // namespace cc 1293 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698