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

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

Issue 1310743006: Replace use of scoped_ptr with OwnPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | « no previous file | no next file » | 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 a839b1ce73f670ac09edba0b3d0937e1988734ec..f55f991869c0846128cf5c77f4deb355fbaffafa 100644
--- a/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -23,8 +23,9 @@
#include "modules/webgl/WebGLTransformFeedback.h"
#include "modules/webgl/WebGLUniformLocation.h"
#include "modules/webgl/WebGLVertexArrayObject.h"
-
#include "platform/NotImplemented.h"
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
namespace blink {
@@ -176,7 +177,7 @@ ScriptValue WebGL2RenderingContextBase::getInternalformatParameter(ScriptState*
if (length <= 0)
return WebGLAny(scriptState, DOMInt32Array::create(0));
- scoped_ptr<GLint[]> values(new GLint[length]);
+ OwnPtr<GLint[]> values = adoptArrayPtr(new GLint[length]);
for (GLint ii = 0; ii < length; ++ii)
values[ii] = 0;
webContext()->getInternalformativ(target, internalformat, GL_SAMPLES, length, values.get());
@@ -1783,7 +1784,7 @@ String WebGL2RenderingContextBase::getActiveUniformBlockName(WebGLProgram* progr
synthesizeGLError(GL_INVALID_VALUE, "getActiveUniformBlockName", "invalid uniform block index");
return String();
}
- scoped_ptr<GLchar[]> name(new GLchar[maxNameLength]);
+ OwnPtr<GLchar[]> name = adoptArrayPtr(new GLchar[maxNameLength]);
GLsizei length;
webContext()->getActiveUniformBlockName(objectOrZero(program), uniformBlockIndex, maxNameLength, &length, name.get());
return String(name.get(), length);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698