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

Side by Side Diff: webkit/gpu/webgraphicscontext3d_in_process_impl.cc

Issue 6365006: Don't map internalFormat in renderbufferStorage() in embedded envrionment.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "webkit/gpu/webgraphicscontext3d_in_process_impl.h" 5 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 1303
1304 void WebGraphicsContext3DInProcessImpl::releaseShaderCompiler() { 1304 void WebGraphicsContext3DInProcessImpl::releaseShaderCompiler() {
1305 } 1305 }
1306 1306
1307 void WebGraphicsContext3DInProcessImpl::renderbufferStorage( 1307 void WebGraphicsContext3DInProcessImpl::renderbufferStorage(
1308 unsigned long target, 1308 unsigned long target,
1309 unsigned long internalformat, 1309 unsigned long internalformat,
1310 unsigned long width, 1310 unsigned long width,
1311 unsigned long height) { 1311 unsigned long height) {
1312 makeContextCurrent(); 1312 makeContextCurrent();
1313 switch (internalformat) { 1313 if (!is_gles2_) {
1314 case GL_DEPTH_STENCIL: 1314 switch (internalformat) {
1315 internalformat = GL_DEPTH24_STENCIL8_EXT; 1315 case GL_DEPTH_STENCIL:
1316 break; 1316 internalformat = GL_DEPTH24_STENCIL8_EXT;
1317 case GL_DEPTH_COMPONENT16: 1317 break;
1318 internalformat = GL_DEPTH_COMPONENT; 1318 case GL_DEPTH_COMPONENT16:
1319 break; 1319 internalformat = GL_DEPTH_COMPONENT;
1320 case GL_RGBA4: 1320 break;
1321 case GL_RGB5_A1: 1321 case GL_RGBA4:
1322 internalformat = GL_RGBA; 1322 case GL_RGB5_A1:
1323 break; 1323 internalformat = GL_RGBA;
1324 case 0x8D62: // GL_RGB565 1324 break;
1325 internalformat = GL_RGB; 1325 case 0x8D62: // GL_RGB565
1326 break; 1326 internalformat = GL_RGB;
1327 break;
1328 }
1327 } 1329 }
1328 glRenderbufferStorageEXT(target, internalformat, width, height); 1330 glRenderbufferStorageEXT(target, internalformat, width, height);
1329 } 1331 }
1330 1332
1331 DELEGATE_TO_GL_2_C1(sampleCoverage, SampleCoverage, double, bool) 1333 DELEGATE_TO_GL_2_C1(sampleCoverage, SampleCoverage, double, bool)
1332 1334
1333 DELEGATE_TO_GL_4(scissor, Scissor, long, long, unsigned long, unsigned long) 1335 DELEGATE_TO_GL_4(scissor, Scissor, long, long, unsigned long, unsigned long)
1334 1336
1335 void WebGraphicsContext3DInProcessImpl::texImage2D( 1337 void WebGraphicsContext3DInProcessImpl::texImage2D(
1336 unsigned target, unsigned level, unsigned internalFormat, 1338 unsigned target, unsigned level, unsigned internalFormat,
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1647 else 1649 else
1648 ShGetObjectCode(compiler, entry->translated_source.get()); 1650 ShGetObjectCode(compiler, entry->translated_source.get());
1649 } 1651 }
1650 entry->is_valid = true; 1652 entry->is_valid = true;
1651 return true; 1653 return true;
1652 } 1654 }
1653 1655
1654 } // namespace gpu 1656 } // namespace gpu
1655 } // namespace webkit 1657 } // namespace webkit
1656 1658
OLDNEW
« 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