Index: cc/CCLayerTreeHostImpl.cpp |
diff --git a/cc/CCLayerTreeHostImpl.cpp b/cc/CCLayerTreeHostImpl.cpp |
index 23b021fd029781796d107ea182d91f04c0d5ffc0..afb13582714f6ddf1368f8804f5975fc436426f1 100644 |
--- a/cc/CCLayerTreeHostImpl.cpp |
+++ b/cc/CCLayerTreeHostImpl.cpp |
@@ -11,6 +11,7 @@ |
#include "CCDamageTracker.h" |
#include "CCDebugRectHistory.h" |
#include "CCDelayBasedTimeSource.h" |
+#include "CCDelegatingRenderer.h" |
#include "CCFontAtlas.h" |
#include "CCFrameRateCounter.h" |
#include "CCHeadsUpDisplayLayerImpl.h" |
@@ -29,6 +30,7 @@ |
#include "CCScrollbarLayerImpl.h" |
#include "CCSettings.h" |
#include "CCSingleThreadProxy.h" |
+#include "compositor_frame.h" |
#include "TextureUploader.h" |
#include "TraceEvent.h" |
#include <wtf/CurrentTime.h> |
@@ -659,6 +661,13 @@ void CCLayerTreeHostImpl::onVSyncParametersChanged(double monotonicTimebase, dou |
m_client->onVSyncParametersChanged(monotonicTimebase, intervalInSeconds); |
} |
+void CCLayerTreeHostImpl::onSendFrameToParentCompositorAck(const WebKit::WebCompositorFrameAck& webAck) |
+{ |
+ const CompositorFrameAck& ack = static_cast<const CompositorFrameAck&>(webAck); |
+ if (m_renderer) |
+ m_renderer->onSendFrameToParentCompositorAck(ack); |
+} |
+ |
void CCLayerTreeHostImpl::drawLayers(const FrameData& frame) |
{ |
TRACE_EVENT0("cc", "CCLayerTreeHostImpl::drawLayers"); |
@@ -847,7 +856,9 @@ bool CCLayerTreeHostImpl::initializeRenderer(scoped_ptr<CCGraphicsContext> conte |
if (!resourceProvider) |
return false; |
- if (context->context3D()) |
+ if (context->capabilities().hasParentCompositor) |
+ m_renderer = CCDelegatingRenderer::create(this, resourceProvider.get()); |
+ else if (context->context3D()) |
m_renderer = CCRendererGL::create(this, resourceProvider.get()); |
else if (context->softwareDevice()) |
m_renderer = CCRendererSoftware::create(this, resourceProvider.get(), context->softwareDevice()); |