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

Unified Diff: Source/modules/webgl/WebGLProgram.cpp

Issue 1234883002: [Oilpan] Migrate classes under module/webgl onto oilpan heap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 4 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 | « Source/modules/webgl/WebGLProgram.h ('k') | Source/modules/webgl/WebGLProgram.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webgl/WebGLProgram.cpp
diff --git a/Source/modules/webgl/WebGLProgram.cpp b/Source/modules/webgl/WebGLProgram.cpp
index a2c4385869a5e0cfb29ef4ef7448f9ddbd94738d..05ea305b310ba754f5ae598b92c147c8bdb5fe87 100644
--- a/Source/modules/webgl/WebGLProgram.cpp
+++ b/Source/modules/webgl/WebGLProgram.cpp
@@ -32,9 +32,9 @@
namespace blink {
-PassRefPtrWillBeRawPtr<WebGLProgram> WebGLProgram::create(WebGLRenderingContextBase* ctx)
+WebGLProgram* WebGLProgram::create(WebGLRenderingContextBase* ctx)
{
- return adoptRefWillBeNoop(new WebGLProgram(ctx));
+ return new WebGLProgram(ctx);
}
WebGLProgram::WebGLProgram(WebGLRenderingContextBase* ctx)
@@ -48,21 +48,14 @@ WebGLProgram::WebGLProgram(WebGLRenderingContextBase* ctx)
WebGLProgram::~WebGLProgram()
{
-#if ENABLE(OILPAN)
// These heap objects handle detachment on their own. Clear out
// the references to prevent deleteObjectImpl() from trying to do
// same, as we cannot safely access other heap objects from this
// destructor.
m_vertexShader = nullptr;
m_fragmentShader = nullptr;
-#endif
- // Always call detach here to ensure that platform object deletion
- // happens with Oilpan enabled. It keeps the code regular to do it
- // with or without Oilpan enabled.
- //
- // See comment in WebGLBuffer's destructor for additional
- // information on why this is done for WebGLSharedObject-derived
- // objects.
+
+ // See the comment in WebGLObject::detachAndDeleteObject().
detachAndDeleteObject();
}
@@ -120,9 +113,9 @@ WebGLShader* WebGLProgram::getAttachedShader(GLenum type)
{
switch (type) {
case GL_VERTEX_SHADER:
- return m_vertexShader.get();
+ return m_vertexShader;
case GL_FRAGMENT_SHADER:
- return m_fragmentShader.get();
+ return m_fragmentShader;
default:
return 0;
}
« no previous file with comments | « Source/modules/webgl/WebGLProgram.h ('k') | Source/modules/webgl/WebGLProgram.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698