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

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

Issue 23922006: Plumb PinchVirtualViewport layers into CC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments, remove some pinchVirtualViewportEnabled checks. Created 7 years, 3 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 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 void RenderWidgetCompositor::didStopFlinging() { 482 void RenderWidgetCompositor::didStopFlinging() {
483 layer_tree_host_->DidStopFlinging(); 483 layer_tree_host_->DidStopFlinging();
484 } 484 }
485 485
486 void RenderWidgetCompositor::registerForAnimations(WebKit::WebLayer* layer) { 486 void RenderWidgetCompositor::registerForAnimations(WebKit::WebLayer* layer) {
487 cc::Layer* cc_layer = static_cast<webkit::WebLayerImpl*>(layer)->layer(); 487 cc::Layer* cc_layer = static_cast<webkit::WebLayerImpl*>(layer)->layer();
488 cc_layer->layer_animation_controller()->SetAnimationRegistrar( 488 cc_layer->layer_animation_controller()->SetAnimationRegistrar(
489 layer_tree_host_->animation_registrar()); 489 layer_tree_host_->animation_registrar());
490 } 490 }
491 491
492 void RenderWidgetCompositor::registerViewportLayers(
493 const WebKit::WebLayer* pageScaleLayer,
494 const WebKit::WebLayer* innerViewportScrollLayer,
495 const WebKit::WebLayer* outerViewportScrollLayer) {
496 layer_tree_host_->RegisterViewportLayers(
497 static_cast<const webkit::WebLayerImpl*>(pageScaleLayer)->layer(),
498 static_cast<const webkit::WebLayerImpl*>(
499 innerViewportScrollLayer)->layer(),
500 // The outer viewport layer will only exist when using pinch.
enne (OOO) 2013/09/12 18:57:02 pinch => pinch virtual viewports
wjmaclean 2013/09/12 19:06:17 Done.
501 outerViewportScrollLayer ? static_cast<const webkit::WebLayerImpl*>(
502 outerViewportScrollLayer)->layer()
503 : 0);
enne (OOO) 2013/09/12 18:57:02 0 => NULL
wjmaclean 2013/09/12 19:06:17 Done.
504 }
505
506 void RenderWidgetCompositor::clearViewportLayers() {
507 layer_tree_host_->RegisterViewportLayers(scoped_refptr<cc::Layer>(),
508 scoped_refptr<cc::Layer>(),
509 scoped_refptr<cc::Layer>());
510 }
511
492 bool RenderWidgetCompositor::compositeAndReadback( 512 bool RenderWidgetCompositor::compositeAndReadback(
493 void *pixels, const WebRect& rect_in_device_viewport) { 513 void *pixels, const WebRect& rect_in_device_viewport) {
494 return layer_tree_host_->CompositeAndReadback(pixels, 514 return layer_tree_host_->CompositeAndReadback(pixels,
495 rect_in_device_viewport); 515 rect_in_device_viewport);
496 } 516 }
497 517
498 void RenderWidgetCompositor::finishAllRendering() { 518 void RenderWidgetCompositor::finishAllRendering() {
499 layer_tree_host_->FinishAllRendering(); 519 layer_tree_host_->FinishAllRendering();
500 } 520 }
501 521
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 614 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
595 } 615 }
596 616
597 scoped_refptr<cc::ContextProvider> 617 scoped_refptr<cc::ContextProvider>
598 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 618 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
599 return RenderThreadImpl::current()-> 619 return RenderThreadImpl::current()->
600 OffscreenContextProviderForCompositorThread(); 620 OffscreenContextProviderForCompositorThread();
601 } 621 }
602 622
603 } // namespace content 623 } // namespace content
OLDNEW
« cc/trees/layer_tree_impl.cc ('K') | « content/renderer/gpu/render_widget_compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698