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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp

Issue 2502413004: WTF/std normalization: replace WTF::Vector::last with ::back (Closed)
Patch Set: rebase Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/webgl/WebGL2RenderingContextBase.h" 5 #include "modules/webgl/WebGL2RenderingContextBase.h"
6 6
7 #include "bindings/modules/v8/WebGLAny.h" 7 #include "bindings/modules/v8/WebGLAny.h"
8 #include "core/dom/DOMException.h" 8 #include "core/dom/DOMException.h"
9 #include "core/frame/ImageBitmap.h" 9 #include "core/frame/ImageBitmap.h"
10 #include "core/html/HTMLCanvasElement.h" 10 #include "core/html/HTMLCanvasElement.h"
(...skipping 3366 matching lines...) Expand 10 before | Expand all | Expand 10 after
3377 synthesizeGLError(GL_INVALID_ENUM, "transformFeedbackVaryings", 3377 synthesizeGLError(GL_INVALID_ENUM, "transformFeedbackVaryings",
3378 "invalid buffer mode"); 3378 "invalid buffer mode");
3379 return; 3379 return;
3380 } 3380 }
3381 3381
3382 Vector<CString> 3382 Vector<CString>
3383 keepAlive; // Must keep these instances alive while looking at their data 3383 keepAlive; // Must keep these instances alive while looking at their data
3384 Vector<const char*> varyingStrings; 3384 Vector<const char*> varyingStrings;
3385 for (size_t i = 0; i < varyings.size(); ++i) { 3385 for (size_t i = 0; i < varyings.size(); ++i) {
3386 keepAlive.append(varyings[i].ascii()); 3386 keepAlive.append(varyings[i].ascii());
3387 varyingStrings.append(keepAlive.last().data()); 3387 varyingStrings.append(keepAlive.back().data());
3388 } 3388 }
3389 3389
3390 contextGL()->TransformFeedbackVaryings(objectOrZero(program), varyings.size(), 3390 contextGL()->TransformFeedbackVaryings(objectOrZero(program), varyings.size(),
3391 varyingStrings.data(), bufferMode); 3391 varyingStrings.data(), bufferMode);
3392 } 3392 }
3393 3393
3394 WebGLActiveInfo* WebGL2RenderingContextBase::getTransformFeedbackVarying( 3394 WebGLActiveInfo* WebGL2RenderingContextBase::getTransformFeedbackVarying(
3395 WebGLProgram* program, 3395 WebGLProgram* program,
3396 GLuint index) { 3396 GLuint index) {
3397 if (isContextLost() || 3397 if (isContextLost() ||
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
3562 const Vector<String>& uniformNames) { 3562 const Vector<String>& uniformNames) {
3563 Vector<GLuint> result; 3563 Vector<GLuint> result;
3564 if (isContextLost() || !validateWebGLObject("getUniformIndices", program)) 3564 if (isContextLost() || !validateWebGLObject("getUniformIndices", program))
3565 return result; 3565 return result;
3566 3566
3567 Vector<CString> 3567 Vector<CString>
3568 keepAlive; // Must keep these instances alive while looking at their data 3568 keepAlive; // Must keep these instances alive while looking at their data
3569 Vector<const char*> uniformStrings; 3569 Vector<const char*> uniformStrings;
3570 for (size_t i = 0; i < uniformNames.size(); ++i) { 3570 for (size_t i = 0; i < uniformNames.size(); ++i) {
3571 keepAlive.append(uniformNames[i].ascii()); 3571 keepAlive.append(uniformNames[i].ascii());
3572 uniformStrings.append(keepAlive.last().data()); 3572 uniformStrings.append(keepAlive.back().data());
3573 } 3573 }
3574 3574
3575 result.resize(uniformNames.size()); 3575 result.resize(uniformNames.size());
3576 contextGL()->GetUniformIndices(objectOrZero(program), uniformStrings.size(), 3576 contextGL()->GetUniformIndices(objectOrZero(program), uniformStrings.size(),
3577 uniformStrings.data(), result.data()); 3577 uniformStrings.data(), result.data());
3578 return result; 3578 return result;
3579 } 3579 }
3580 3580
3581 ScriptValue WebGL2RenderingContextBase::getActiveUniforms( 3581 ScriptValue WebGL2RenderingContextBase::getActiveUniforms(
3582 ScriptState* scriptState, 3582 ScriptState* scriptState,
(...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after
4940 4940
4941 void WebGL2RenderingContextBase:: 4941 void WebGL2RenderingContextBase::
4942 DrawingBufferClientRestorePixelUnpackBufferBinding() { 4942 DrawingBufferClientRestorePixelUnpackBufferBinding() {
4943 if (!contextGL()) 4943 if (!contextGL())
4944 return; 4944 return;
4945 contextGL()->BindBuffer(GL_PIXEL_UNPACK_BUFFER, 4945 contextGL()->BindBuffer(GL_PIXEL_UNPACK_BUFFER,
4946 objectOrZero(m_boundPixelUnpackBuffer.get())); 4946 objectOrZero(m_boundPixelUnpackBuffer.get()));
4947 } 4947 }
4948 4948
4949 } // namespace blink 4949 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/peerconnection/RTCDataChannelTest.cpp ('k') | third_party/WebKit/Source/platform/PODArena.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698