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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 12496013: Move compositor bindings implementations out of WebKit::, fix style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/renderer/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 impl_thread.Pass()); 301 impl_thread.Pass());
302 return layer_tree_host_; 302 return layer_tree_host_;
303 } 303 }
304 304
305 void RenderWidgetCompositor::setSurfaceReady() { 305 void RenderWidgetCompositor::setSurfaceReady() {
306 layer_tree_host_->SetSurfaceReady(); 306 layer_tree_host_->SetSurfaceReady();
307 } 307 }
308 308
309 void RenderWidgetCompositor::setRootLayer(const WebKit::WebLayer& layer) { 309 void RenderWidgetCompositor::setRootLayer(const WebKit::WebLayer& layer) {
310 layer_tree_host_->SetRootLayer( 310 layer_tree_host_->SetRootLayer(
311 static_cast<const WebKit::WebLayerImpl*>(&layer)->layer()); 311 static_cast<const webkit::WebLayerImpl*>(&layer)->layer());
312 } 312 }
313 313
314 void RenderWidgetCompositor::clearRootLayer() { 314 void RenderWidgetCompositor::clearRootLayer() {
315 layer_tree_host_->SetRootLayer(scoped_refptr<cc::Layer>()); 315 layer_tree_host_->SetRootLayer(scoped_refptr<cc::Layer>());
316 } 316 }
317 317
318 void RenderWidgetCompositor::setViewportSize( 318 void RenderWidgetCompositor::setViewportSize(
319 const WebSize& layout_viewport_size, 319 const WebSize& layout_viewport_size,
320 const WebSize& device_viewport_size) { 320 const WebSize& device_viewport_size) {
321 layer_tree_host_->SetViewportSize(layout_viewport_size, device_viewport_size); 321 layer_tree_host_->SetViewportSize(layout_viewport_size, device_viewport_size);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 387
388 bool RenderWidgetCompositor::commitRequested() const { 388 bool RenderWidgetCompositor::commitRequested() const {
389 return layer_tree_host_->CommitRequested(); 389 return layer_tree_host_->CommitRequested();
390 } 390 }
391 391
392 void RenderWidgetCompositor::didStopFlinging() { 392 void RenderWidgetCompositor::didStopFlinging() {
393 layer_tree_host_->DidStopFlinging(); 393 layer_tree_host_->DidStopFlinging();
394 } 394 }
395 395
396 void RenderWidgetCompositor::registerForAnimations(WebKit::WebLayer* layer) { 396 void RenderWidgetCompositor::registerForAnimations(WebKit::WebLayer* layer) {
397 cc::Layer* cc_layer = static_cast<WebKit::WebLayerImpl*>(layer)->layer(); 397 cc::Layer* cc_layer = static_cast<webkit::WebLayerImpl*>(layer)->layer();
398 cc_layer->layer_animation_controller()->SetAnimationRegistrar( 398 cc_layer->layer_animation_controller()->SetAnimationRegistrar(
399 layer_tree_host_->animation_registrar()); 399 layer_tree_host_->animation_registrar());
400 } 400 }
401 401
402 bool RenderWidgetCompositor::compositeAndReadback( 402 bool RenderWidgetCompositor::compositeAndReadback(
403 void *pixels, const WebRect& rect_in_device_viewport) { 403 void *pixels, const WebRect& rect_in_device_viewport) {
404 return layer_tree_host_->CompositeAndReadback(pixels, 404 return layer_tree_host_->CompositeAndReadback(pixels,
405 rect_in_device_viewport); 405 rect_in_device_viewport);
406 } 406 }
407 407
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 504 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
505 } 505 }
506 506
507 scoped_refptr<cc::ContextProvider> 507 scoped_refptr<cc::ContextProvider>
508 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 508 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
509 return RenderThreadImpl::current()-> 509 return RenderThreadImpl::current()->
510 OffscreenContextProviderForCompositorThread(); 510 OffscreenContextProviderForCompositorThread();
511 } 511 }
512 512
513 } // namespace content 513 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698