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

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

Issue 23483044: Revert "Plumb PinchVirtualViewport layers into CC." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.h ('k') | 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 (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*>(innerViewportScrollLayer)
499 ->layer(),
500 // The outer viewport layer will only exist when using pinch virtual
501 // viewports.
502 outerViewportScrollLayer ? static_cast<const webkit::WebLayerImpl*>(
503 outerViewportScrollLayer)->layer()
504 : NULL);
505 }
506
507 void RenderWidgetCompositor::clearViewportLayers() {
508 layer_tree_host_->RegisterViewportLayers(scoped_refptr<cc::Layer>(),
509 scoped_refptr<cc::Layer>(),
510 scoped_refptr<cc::Layer>());
511 }
512
513 bool RenderWidgetCompositor::compositeAndReadback( 492 bool RenderWidgetCompositor::compositeAndReadback(
514 void *pixels, const WebRect& rect_in_device_viewport) { 493 void *pixels, const WebRect& rect_in_device_viewport) {
515 return layer_tree_host_->CompositeAndReadback(pixels, 494 return layer_tree_host_->CompositeAndReadback(pixels,
516 rect_in_device_viewport); 495 rect_in_device_viewport);
517 } 496 }
518 497
519 void RenderWidgetCompositor::finishAllRendering() { 498 void RenderWidgetCompositor::finishAllRendering() {
520 layer_tree_host_->FinishAllRendering(); 499 layer_tree_host_->FinishAllRendering();
521 } 500 }
522 501
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 594 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
616 } 595 }
617 596
618 scoped_refptr<cc::ContextProvider> 597 scoped_refptr<cc::ContextProvider>
619 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 598 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
620 return RenderThreadImpl::current()-> 599 return RenderThreadImpl::current()->
621 OffscreenContextProviderForCompositorThread(); 600 OffscreenContextProviderForCompositorThread();
622 } 601 }
623 602
624 } // namespace content 603 } // namespace content
OLDNEW
« no previous file with comments | « 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