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

Unified Diff: cc/CCLayerTreeHostImpl.cpp

Issue 10915298: Add CCDelegatingRenderer, and corresponding IPCs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/CCLayerTreeHostImpl.h ('k') | cc/CCOcclusionTracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « cc/CCLayerTreeHostImpl.h ('k') | cc/CCOcclusionTracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698