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

Side by Side Diff: Source/core/html/canvas/WebGLRenderingContext.cpp

Issue 124943003: Remove 'String::append' from some of the blink source. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Incorporated review comments 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 2669 matching lines...) Expand 10 before | Expand all | Expand 10 after
2680 for (GC3Dint i = 0; i < activeUniforms; i++) { 2680 for (GC3Dint i = 0; i < activeUniforms; i++) {
2681 ActiveInfo info; 2681 ActiveInfo info;
2682 if (!m_context->getActiveUniform(objectOrZero(program), i, info)) 2682 if (!m_context->getActiveUniform(objectOrZero(program), i, info))
2683 return WebGLGetInfo(); 2683 return WebGLGetInfo();
2684 // Strip "[0]" from the name if it's an array. 2684 // Strip "[0]" from the name if it's an array.
2685 if (info.size > 1 && info.name.endsWith("[0]")) 2685 if (info.size > 1 && info.name.endsWith("[0]"))
2686 info.name = info.name.left(info.name.length() - 3); 2686 info.name = info.name.left(info.name.length() - 3);
2687 // If it's an array, we need to iterate through each element, appending "[index]" to the name. 2687 // If it's an array, we need to iterate through each element, appending "[index]" to the name.
2688 for (GC3Dint index = 0; index < info.size; ++index) { 2688 for (GC3Dint index = 0; index < info.size; ++index) {
2689 String name = info.name; 2689 String name = info.name;
2690 if (info.size > 1 && index >= 1) { 2690 if (info.size > 1 && index >= 1)
2691 name.append('['); 2691 name = info.name + "[" + String::number(index) + "]";
2692 name.append(String::number(index));
2693 name.append(']');
2694 }
2695 // Now need to look this up by name again to find its location 2692 // Now need to look this up by name again to find its location
2696 GC3Dint loc = m_context->getUniformLocation(objectOrZero(program), n ame); 2693 GC3Dint loc = m_context->getUniformLocation(objectOrZero(program), n ame);
2697 if (loc == location) { 2694 if (loc == location) {
2698 // Found it. Use the type in the ActiveInfo to determine the ret urn type. 2695 // Found it. Use the type in the ActiveInfo to determine the ret urn type.
2699 GC3Denum baseType; 2696 GC3Denum baseType;
2700 unsigned int length; 2697 unsigned int length;
2701 switch (info.type) { 2698 switch (info.type) {
2702 case GL_BOOL: 2699 case GL_BOOL:
2703 baseType = GL_BOOL; 2700 baseType = GL_BOOL;
2704 length = 1; 2701 length = 1;
(...skipping 2916 matching lines...) Expand 10 before | Expand all | Expand 10 after
5621 if (m_textureUnits[i].m_texture2DBinding 5618 if (m_textureUnits[i].m_texture2DBinding
5622 || m_textureUnits[i].m_textureCubeMapBinding) { 5619 || m_textureUnits[i].m_textureCubeMapBinding) {
5623 m_onePlusMaxNonDefaultTextureUnit = i + 1; 5620 m_onePlusMaxNonDefaultTextureUnit = i + 1;
5624 return; 5621 return;
5625 } 5622 }
5626 } 5623 }
5627 m_onePlusMaxNonDefaultTextureUnit = 0; 5624 m_onePlusMaxNonDefaultTextureUnit = 0;
5628 } 5625 }
5629 5626
5630 } // namespace WebCore 5627 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698