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

Side by Side Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc

Issue 255713008: Change glimage to accept a type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 6 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 5 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
6 6
7 #include "third_party/khronos/GLES2/gl2.h" 7 #include "third_party/khronos/GLES2/gl2.h"
8 #ifndef GL_GLEXT_PROTOTYPES 8 #ifndef GL_GLEXT_PROTOTYPES
9 #define GL_GLEXT_PROTOTYPES 1 9 #define GL_GLEXT_PROTOTYPES 1
10 #endif 10 #endif
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1329 WGC3Dintptr offset, 1329 WGC3Dintptr offset,
1330 WGC3Dsizei primcount) { 1330 WGC3Dsizei primcount) {
1331 gl_->DrawElementsInstancedANGLE( 1331 gl_->DrawElementsInstancedANGLE(
1332 mode, count, type, 1332 mode, count, type,
1333 reinterpret_cast<void*>(static_cast<intptr_t>(offset)), primcount); 1333 reinterpret_cast<void*>(static_cast<intptr_t>(offset)), primcount);
1334 } 1334 }
1335 1335
1336 DELEGATE_TO_GL_2(vertexAttribDivisorANGLE, VertexAttribDivisorANGLE, WGC3Duint, 1336 DELEGATE_TO_GL_2(vertexAttribDivisorANGLE, VertexAttribDivisorANGLE, WGC3Duint,
1337 WGC3Duint) 1337 WGC3Duint)
1338 1338
1339 DELEGATE_TO_GL_3R(createImageCHROMIUM, CreateImageCHROMIUM, 1339 DELEGATE_TO_GL_4R(createImageCHROMIUM,
1340 WGC3Dsizei, WGC3Dsizei, WGC3Denum, 1340 CreateImageCHROMIUM,
1341 WGC3Dsizei,
1342 WGC3Dsizei,
1343 WGC3Denum,
1344 WGC3Denum,
1341 WGC3Duint); 1345 WGC3Duint);
1342 1346
1347 WGC3Duint WebGraphicsContext3DCommandBufferImpl::createImageCHROMIUM(
1348 WGC3Dsizei width,
1349 WGC3Dsizei height,
1350 WGC3Denum internalformat) {
1351 return gl_->CreateImageCHROMIUM(
1352 width, height, internalformat, GL_IMAGE_MAP_CHROMIUM);
1353 }
1354
1343 DELEGATE_TO_GL_1(destroyImageCHROMIUM, DestroyImageCHROMIUM, WGC3Duint); 1355 DELEGATE_TO_GL_1(destroyImageCHROMIUM, DestroyImageCHROMIUM, WGC3Duint);
1344 1356
1345 DELEGATE_TO_GL_3(getImageParameterivCHROMIUM, GetImageParameterivCHROMIUM, 1357 DELEGATE_TO_GL_3(getImageParameterivCHROMIUM, GetImageParameterivCHROMIUM,
1346 WGC3Duint, WGC3Denum, GLint*); 1358 WGC3Duint, WGC3Denum, GLint*);
1347 1359
1348 DELEGATE_TO_GL_2R(mapImageCHROMIUM, MapImageCHROMIUM, 1360 DELEGATE_TO_GL_1R(mapImageCHROMIUM, MapImageCHROMIUM, WGC3Duint, void*);
1349 WGC3Duint, WGC3Denum, void*); 1361
1362 void* WebGraphicsContext3DCommandBufferImpl::mapImageCHROMIUM(
1363 WGC3Duint image_id,
1364 WGC3Denum access) {
1365 return gl_->MapImageCHROMIUM(image_id);
1366 }
1350 1367
1351 DELEGATE_TO_GL_1(unmapImageCHROMIUM, UnmapImageCHROMIUM, WGC3Duint); 1368 DELEGATE_TO_GL_1(unmapImageCHROMIUM, UnmapImageCHROMIUM, WGC3Duint);
1352 1369
1353 DELEGATE_TO_GL_6(framebufferTexture2DMultisampleEXT, 1370 DELEGATE_TO_GL_6(framebufferTexture2DMultisampleEXT,
1354 FramebufferTexture2DMultisampleEXT, 1371 FramebufferTexture2DMultisampleEXT,
1355 WGC3Denum, WGC3Denum, WGC3Denum, WebGLId, WGC3Dint, WGC3Dsizei) 1372 WGC3Denum, WGC3Denum, WGC3Denum, WebGLId, WGC3Dint, WGC3Dsizei)
1356 1373
1357 DELEGATE_TO_GL_5(renderbufferStorageMultisampleEXT, 1374 DELEGATE_TO_GL_5(renderbufferStorageMultisampleEXT,
1358 RenderbufferStorageMultisampleEXT, WGC3Denum, WGC3Dsizei, 1375 RenderbufferStorageMultisampleEXT, WGC3Denum, WGC3Dsizei,
1359 WGC3Denum, WGC3Dsizei, WGC3Dsizei) 1376 WGC3Denum, WGC3Dsizei, WGC3Dsizei)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 1416
1400 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1417 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1401 const std::string& message, int id) { 1418 const std::string& message, int id) {
1402 if (error_message_callback_) { 1419 if (error_message_callback_) {
1403 blink::WebString str = blink::WebString::fromUTF8(message.c_str()); 1420 blink::WebString str = blink::WebString::fromUTF8(message.c_str());
1404 error_message_callback_->onErrorMessage(str, id); 1421 error_message_callback_->onErrorMessage(str, id);
1405 } 1422 }
1406 } 1423 }
1407 1424
1408 } // namespace content 1425 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698