Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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::registerPinchViewportLayers( | |
| 493 const WebKit::WebLayer* innerViewportClipLayer, | |
|
enne (OOO)
2013/09/10 17:03:04
I understand setting the inner and outer viewport
wjmaclean
2013/09/11 00:19:25
Actually, the clip layer probably does not need to
enne (OOO)
2013/09/11 00:49:46
Yeah, I was thinking something along those lines t
wjmaclean
2013/09/11 17:30:37
Hmm, ok ... if we're setting this on the Blink sid
| |
| 494 const WebKit::WebLayer* pageScaleLayerLayer, | |
|
enne (OOO)
2013/09/10 17:03:04
I'd like it if this patch could help make parts of
wjmaclean
2013/09/11 00:19:25
Hmm, ok. I guess I was still operating on the prin
enne (OOO)
2013/09/11 00:49:46
If you want to keep it separate as an intermediate
wjmaclean
2013/09/11 17:30:37
Done.
I've renamed the WebLayerTreeView interface
| |
| 495 const WebKit::WebLayer* innerViewportScrollLayer, | |
| 496 const WebKit::WebLayer* outerViewportScrollLayer) { | |
| 497 layer_tree_host_->RegisterPinchViewportLayers( | |
| 498 static_cast<const webkit::WebLayerImpl*>(innerViewportClipLayer)->layer(), | |
| 499 static_cast<const webkit::WebLayerImpl*>(pageScaleLayerLayer)->layer(), | |
| 500 static_cast<const webkit::WebLayerImpl*>(innerViewportScrollLayer) | |
| 501 ->layer(), | |
| 502 static_cast<const webkit::WebLayerImpl*>(outerViewportScrollLayer) | |
| 503 ->layer()); | |
| 504 } | |
| 505 | |
| 506 void RenderWidgetCompositor::clearPinchViewportLayers() { | |
| 507 layer_tree_host_->RegisterPinchViewportLayers(scoped_refptr<cc::Layer>(), | |
| 508 scoped_refptr<cc::Layer>(), | |
| 509 scoped_refptr<cc::Layer>(), | |
| 510 scoped_refptr<cc::Layer>()); | |
| 511 } | |
| 512 | |
| 492 bool RenderWidgetCompositor::compositeAndReadback( | 513 bool RenderWidgetCompositor::compositeAndReadback( |
| 493 void *pixels, const WebRect& rect_in_device_viewport) { | 514 void *pixels, const WebRect& rect_in_device_viewport) { |
| 494 return layer_tree_host_->CompositeAndReadback(pixels, | 515 return layer_tree_host_->CompositeAndReadback(pixels, |
| 495 rect_in_device_viewport); | 516 rect_in_device_viewport); |
| 496 } | 517 } |
| 497 | 518 |
| 498 void RenderWidgetCompositor::finishAllRendering() { | 519 void RenderWidgetCompositor::finishAllRendering() { |
| 499 layer_tree_host_->FinishAllRendering(); | 520 layer_tree_host_->FinishAllRendering(); |
| 500 } | 521 } |
| 501 | 522 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 594 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 615 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 595 } | 616 } |
| 596 | 617 |
| 597 scoped_refptr<cc::ContextProvider> | 618 scoped_refptr<cc::ContextProvider> |
| 598 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 619 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 599 return RenderThreadImpl::current()-> | 620 return RenderThreadImpl::current()-> |
| 600 OffscreenContextProviderForCompositorThread(); | 621 OffscreenContextProviderForCompositorThread(); |
| 601 } | 622 } |
| 602 | 623 |
| 603 } // namespace content | 624 } // namespace content |
| OLD | NEW |