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

Unified Diff: Source/platform/graphics/GraphicsContext3D.cpp

Issue 127493002: Removed most calls to GraphicsContext3D from DrawingBuffer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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
Index: Source/platform/graphics/GraphicsContext3D.cpp
diff --git a/Source/platform/graphics/GraphicsContext3D.cpp b/Source/platform/graphics/GraphicsContext3D.cpp
index b5ceca36f7675308f2bfbc06636313d3a2e76210..0936fcc0625f71a8bd73e4374b9a1720dab40148 100644
--- a/Source/platform/graphics/GraphicsContext3D.cpp
+++ b/Source/platform/graphics/GraphicsContext3D.cpp
@@ -93,8 +93,6 @@ GraphicsContext3D::GraphicsContext3D(blink::WebGraphicsContext3D* webContext)
GraphicsContext3D::~GraphicsContext3D()
{
- setContextLostCallback(nullptr);
- setErrorMessageCallback(nullptr);
}
// Macros to assist in delegating from GraphicsContext3D to
@@ -166,52 +164,6 @@ void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8
m_impl->name(a1, a2, a3, a4, a5, a6, a7, a8, a9); \
}
-class GraphicsContext3DContextLostCallbackAdapter : public blink::WebGraphicsContext3D::WebGraphicsContextLostCallback {
-public:
- GraphicsContext3DContextLostCallbackAdapter(PassOwnPtr<GraphicsContext3D::ContextLostCallback> callback)
- : m_contextLostCallback(callback) { }
- virtual ~GraphicsContext3DContextLostCallbackAdapter() { }
-
- virtual void onContextLost()
- {
- if (m_contextLostCallback)
- m_contextLostCallback->onContextLost();
- }
-private:
- OwnPtr<GraphicsContext3D::ContextLostCallback> m_contextLostCallback;
-};
-
-class GraphicsContext3DErrorMessageCallbackAdapter : public blink::WebGraphicsContext3D::WebGraphicsErrorMessageCallback {
-public:
- GraphicsContext3DErrorMessageCallbackAdapter(PassOwnPtr<GraphicsContext3D::ErrorMessageCallback> callback)
- : m_errorMessageCallback(callback) { }
- virtual ~GraphicsContext3DErrorMessageCallbackAdapter() { }
-
- virtual void onErrorMessage(const blink::WebString& message, blink::WGC3Dint id)
- {
- if (m_errorMessageCallback)
- m_errorMessageCallback->onErrorMessage(message, id);
- }
-private:
- OwnPtr<GraphicsContext3D::ErrorMessageCallback> m_errorMessageCallback;
-};
-
-void GraphicsContext3D::setContextLostCallback(PassOwnPtr<GraphicsContext3D::ContextLostCallback> callback)
-{
- if (m_ownedWebContext) {
- m_contextLostCallbackAdapter = adoptPtr(new GraphicsContext3DContextLostCallbackAdapter(callback));
- m_ownedWebContext->setContextLostCallback(m_contextLostCallbackAdapter.get());
- }
-}
-
-void GraphicsContext3D::setErrorMessageCallback(PassOwnPtr<GraphicsContext3D::ErrorMessageCallback> callback)
-{
- if (m_ownedWebContext) {
- m_errorMessageCallbackAdapter = adoptPtr(new GraphicsContext3DErrorMessageCallbackAdapter(callback));
- m_ownedWebContext->setErrorMessageCallback(m_errorMessageCallbackAdapter.get());
- }
-}
-
PassRefPtr<GraphicsContext3D> GraphicsContext3D::createContextSupport(blink::WebGraphicsContext3D* webContext)
{
RefPtr<GraphicsContext3D> context = adoptRef(new GraphicsContext3D(webContext));
@@ -258,7 +210,6 @@ GrContext* GraphicsContext3D::grContext()
}
DELEGATE_TO_WEBCONTEXT_R(makeContextCurrent, bool)
-DELEGATE_TO_WEBCONTEXT_R(lastFlushID, uint32_t)
DELEGATE_TO_WEBCONTEXT_1(activeTexture, GLenum)
DELEGATE_TO_WEBCONTEXT_2(attachShader, Platform3DObject, Platform3DObject)

Powered by Google App Engine
This is Rietveld 408576698