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

Unified Diff: Source/modules/webgl/WebGL2RenderingContextBase.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/WebGL2RenderingContextBase.h ('k') | Source/modules/webgl/WebGLActiveInfo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webgl/WebGL2RenderingContextBase.cpp
diff --git a/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/Source/modules/webgl/WebGL2RenderingContextBase.cpp
index ac4d668041be05faea042a43cee8b63a71352934..155e0a4ebc9ac12cd6f56750e267f32ac7ae5012 100644
--- a/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -1121,12 +1121,12 @@ void WebGL2RenderingContextBase::clearBufferfi(GLenum buffer, GLint drawbuffer,
webContext()->clearBufferfi(buffer, drawbuffer, depth, stencil);
}
-PassRefPtrWillBeRawPtr<WebGLQuery> WebGL2RenderingContextBase::createQuery()
+WebGLQuery* WebGL2RenderingContextBase::createQuery()
{
if (isContextLost())
return nullptr;
- RefPtrWillBeRawPtr<WebGLQuery> o = WebGLQuery::create(this);
- addSharedObject(o.get());
+ WebGLQuery* o = WebGLQuery::create(this);
+ addSharedObject(o);
return o;
}
@@ -1234,7 +1234,7 @@ void WebGL2RenderingContextBase::endQuery(GLenum target)
webContext()->endQueryEXT(target);
}
-PassRefPtrWillBeRawPtr<WebGLQuery> WebGL2RenderingContextBase::getQuery(GLenum target, GLenum pname)
+WebGLQuery* WebGL2RenderingContextBase::getQuery(GLenum target, GLenum pname)
{
if (isContextLost())
return nullptr;
@@ -1248,10 +1248,10 @@ PassRefPtrWillBeRawPtr<WebGLQuery> WebGL2RenderingContextBase::getQuery(GLenum t
case GL_ANY_SAMPLES_PASSED:
case GL_ANY_SAMPLES_PASSED_CONSERVATIVE:
if (m_currentBooleanOcclusionQuery && m_currentBooleanOcclusionQuery->getTarget() == target)
- return PassRefPtrWillBeRawPtr<WebGLQuery>(m_currentBooleanOcclusionQuery.get());
+ return m_currentBooleanOcclusionQuery;
break;
case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:
- return PassRefPtrWillBeRawPtr<WebGLQuery>(m_currentTransformFeedbackPrimitivesWrittenQuery.get());
+ return m_currentTransformFeedbackPrimitivesWrittenQuery;
default:
synthesizeGLError(GL_INVALID_ENUM, "getQuery", "invalid target");
return nullptr;
@@ -1283,12 +1283,12 @@ ScriptValue WebGL2RenderingContextBase::getQueryParameter(ScriptState* scriptSta
}
}
-PassRefPtrWillBeRawPtr<WebGLSampler> WebGL2RenderingContextBase::createSampler()
+WebGLSampler* WebGL2RenderingContextBase::createSampler()
{
if (isContextLost())
return nullptr;
- RefPtrWillBeRawPtr<WebGLSampler> o = WebGLSampler::create(this);
- addSharedObject(o.get());
+ WebGLSampler* o = WebGLSampler::create(this);
+ addSharedObject(o);
return o;
}
@@ -1379,14 +1379,14 @@ ScriptValue WebGL2RenderingContextBase::getSamplerParameter(ScriptState* scriptS
}
}
-PassRefPtrWillBeRawPtr<WebGLSync> WebGL2RenderingContextBase::fenceSync(GLenum condition, GLbitfield flags)
+WebGLSync* WebGL2RenderingContextBase::fenceSync(GLenum condition, GLbitfield flags)
{
if (isContextLost())
return nullptr;
- RefPtrWillBeRawPtr<WebGLSync> o = WebGLFenceSync::create(this, condition, flags);
- addSharedObject(o.get());
- return o.release();
+ WebGLSync* o = WebGLFenceSync::create(this, condition, flags);
+ addSharedObject(o);
+ return o;
}
GLboolean WebGL2RenderingContextBase::isSync(WebGLSync* sync)
@@ -1452,12 +1452,12 @@ ScriptValue WebGL2RenderingContextBase::getSyncParameter(ScriptState* scriptStat
}
}
-PassRefPtrWillBeRawPtr<WebGLTransformFeedback> WebGL2RenderingContextBase::createTransformFeedback()
+WebGLTransformFeedback* WebGL2RenderingContextBase::createTransformFeedback()
{
if (isContextLost())
return nullptr;
- RefPtrWillBeRawPtr<WebGLTransformFeedback> o = WebGLTransformFeedback::create(this);
- addSharedObject(o.get());
+ WebGLTransformFeedback* o = WebGLTransformFeedback::create(this);
+ addSharedObject(o);
return o;
}
@@ -1533,7 +1533,7 @@ void WebGL2RenderingContextBase::transformFeedbackVaryings(WebGLProgram* program
webContext()->transformFeedbackVaryings(objectOrZero(program), varyings.size(), varyingStrings.data(), bufferMode);
}
-PassRefPtrWillBeRawPtr<WebGLActiveInfo> WebGL2RenderingContextBase::getTransformFeedbackVarying(WebGLProgram* program, GLuint index)
+WebGLActiveInfo* WebGL2RenderingContextBase::getTransformFeedbackVarying(WebGLProgram* program, GLuint index)
{
if (isContextLost() || !validateWebGLObject("getTransformFeedbackVarying", program))
return nullptr;
@@ -1710,14 +1710,14 @@ void WebGL2RenderingContextBase::uniformBlockBinding(WebGLProgram* program, GLui
webContext()->uniformBlockBinding(objectOrZero(program), uniformBlockIndex, uniformBlockBinding);
}
-PassRefPtrWillBeRawPtr<WebGLVertexArrayObject> WebGL2RenderingContextBase::createVertexArray()
+WebGLVertexArrayObject* WebGL2RenderingContextBase::createVertexArray()
{
if (isContextLost())
return nullptr;
- RefPtrWillBeRawPtr<WebGLVertexArrayObject> o = WebGLVertexArrayObject::create(this, WebGLVertexArrayObjectBase::VaoTypeUser);
- addContextObject(o.get());
- return o.release();
+ WebGLVertexArrayObject* o = WebGLVertexArrayObject::create(this, WebGLVertexArrayObjectBase::VaoTypeUser);
+ addContextObject(o);
+ return o;
}
void WebGL2RenderingContextBase::deleteVertexArray(WebGLVertexArrayObject* vertexArray)
@@ -1823,11 +1823,11 @@ ScriptValue WebGL2RenderingContextBase::getParameter(ScriptState* scriptState, G
return WebGLAny(scriptState, "WebGL 2.0 (" + String(webContext()->getString(GL_VERSION)) + ")");
case GL_COPY_READ_BUFFER_BINDING:
- return WebGLAny(scriptState, PassRefPtrWillBeRawPtr<WebGLObject>(m_boundCopyReadBuffer.get()));
+ return WebGLAny(scriptState, m_boundCopyReadBuffer.get());
case GL_COPY_WRITE_BUFFER_BINDING:
- return WebGLAny(scriptState, PassRefPtrWillBeRawPtr<WebGLObject>(m_boundCopyWriteBuffer.get()));
+ return WebGLAny(scriptState, m_boundCopyWriteBuffer.get());
case GL_DRAW_FRAMEBUFFER_BINDING:
- return WebGLAny(scriptState, PassRefPtrWillBeRawPtr<WebGLObject>(m_framebufferBinding.get()));
+ return WebGLAny(scriptState, m_framebufferBinding.get());
case GL_FRAGMENT_SHADER_DERIVATIVE_HINT:
return getUnsignedIntParameter(scriptState, pname);
case GL_MAX_3D_TEXTURE_SIZE:
@@ -1893,9 +1893,9 @@ ScriptValue WebGL2RenderingContextBase::getParameter(ScriptState* scriptState, G
case GL_PACK_SKIP_ROWS:
return getIntParameter(scriptState, pname);
case GL_PIXEL_PACK_BUFFER_BINDING:
- return WebGLAny(scriptState, PassRefPtrWillBeRawPtr<WebGLObject>(m_boundPixelPackBuffer.get()));
+ return WebGLAny(scriptState, m_boundPixelPackBuffer.get());
case GL_PIXEL_UNPACK_BUFFER_BINDING:
- return WebGLAny(scriptState, PassRefPtrWillBeRawPtr<WebGLObject>(m_boundPixelUnpackBuffer.get()));
+ return WebGLAny(scriptState, m_boundPixelUnpackBuffer.get());
case GL_RASTERIZER_DISCARD:
return getBooleanParameter(scriptState, pname);
case GL_READ_BUFFER:
@@ -1911,27 +1911,27 @@ ScriptValue WebGL2RenderingContextBase::getParameter(ScriptState* scriptState, G
return WebGLAny(scriptState, value);
}
case GL_READ_FRAMEBUFFER_BINDING:
- return WebGLAny(scriptState, PassRefPtrWillBeRawPtr<WebGLObject>(m_readFramebufferBinding.get()));
+ return WebGLAny(scriptState, m_readFramebufferBinding.get());
case GL_SAMPLE_ALPHA_TO_COVERAGE:
return getBooleanParameter(scriptState, pname);
case GL_SAMPLE_COVERAGE:
return getBooleanParameter(scriptState, pname);
case GL_SAMPLER_BINDING:
- return WebGLAny(scriptState, PassRefPtrWillBeRawPtr<WebGLObject>(m_samplerUnits[m_activeTextureUnit].get()));
+ return WebGLAny(scriptState, m_samplerUnits[m_activeTextureUnit].get());
case GL_TEXTURE_BINDING_2D_ARRAY:
- return WebGLAny(scriptState, PassRefPtrWillBeRawPtr<WebGLObject>(m_textureUnits[m_activeTextureUnit].m_texture2DArrayBinding.get()));
+ return WebGLAny(scriptState, m_textureUnits[m_activeTextureUnit].m_texture2DArrayBinding.get());
case GL_TEXTURE_BINDING_3D:
- return WebGLAny(scriptState, PassRefPtrWillBeRawPtr<WebGLObject>(m_textureUnits[m_activeTextureUnit].m_texture3DBinding.get()));
+ return WebGLAny(scriptState, m_textureUnits[m_activeTextureUnit].m_texture3DBinding.get());
case GL_TRANSFORM_FEEDBACK_ACTIVE:
return getBooleanParameter(scriptState, pname);
case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING:
- return WebGLAny(scriptState, PassRefPtrWillBeRawPtr<WebGLObject>(m_boundTransformFeedbackBuffer.get()));
+ return WebGLAny(scriptState, m_boundTransformFeedbackBuffer.get());
case GL_TRANSFORM_FEEDBACK_BINDING:
- return WebGLAny(scriptState, PassRefPtrWillBeRawPtr<WebGLObject>(m_transformFeedbackBinding.get()));
+ return WebGLAny(scriptState, m_transformFeedbackBinding.get());
case GL_TRANSFORM_FEEDBACK_PAUSED:
return getBooleanParameter(scriptState, pname);
case GL_UNIFORM_BUFFER_BINDING:
- return WebGLAny(scriptState, PassRefPtrWillBeRawPtr<WebGLObject>(m_boundUniformBuffer.get()));
+ return WebGLAny(scriptState, m_boundUniformBuffer.get());
case GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT:
return getIntParameter(scriptState, pname);
case GL_UNPACK_IMAGE_HEIGHT:
@@ -2234,7 +2234,7 @@ ScriptValue WebGL2RenderingContextBase::getFramebufferAttachmentParameter(Script
case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:
if (!attachmentObject)
break;
- return WebGLAny(scriptState, PassRefPtrWillBeRawPtr<WebGLObject>(attachmentObject));
+ return WebGLAny(scriptState, attachmentObject);
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:
@@ -2357,7 +2357,7 @@ WebGLBuffer* WebGL2RenderingContextBase::validateBufferDataTarget(const char* fu
WebGLBuffer* buffer = nullptr;
switch (target) {
case GL_ELEMENT_ARRAY_BUFFER:
- buffer = m_boundVertexArrayObject->boundElementArrayBuffer().get();
+ buffer = m_boundVertexArrayObject->boundElementArrayBuffer();
break;
case GL_ARRAY_BUFFER:
buffer = m_boundArrayBuffer.get();
« no previous file with comments | « Source/modules/webgl/WebGL2RenderingContextBase.h ('k') | Source/modules/webgl/WebGLActiveInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698