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

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: no ozone 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(width, height, internalformat, GL_READ_WRITE);
1352 }
1353
1343 DELEGATE_TO_GL_1(destroyImageCHROMIUM, DestroyImageCHROMIUM, WGC3Duint); 1354 DELEGATE_TO_GL_1(destroyImageCHROMIUM, DestroyImageCHROMIUM, WGC3Duint);
1344 1355
1345 DELEGATE_TO_GL_3(getImageParameterivCHROMIUM, GetImageParameterivCHROMIUM, 1356 DELEGATE_TO_GL_3(getImageParameterivCHROMIUM, GetImageParameterivCHROMIUM,
1346 WGC3Duint, WGC3Denum, GLint*); 1357 WGC3Duint, WGC3Denum, GLint*);
1347 1358
1348 DELEGATE_TO_GL_2R(mapImageCHROMIUM, MapImageCHROMIUM, 1359 DELEGATE_TO_GL_1R(mapImageCHROMIUM, MapImageCHROMIUM, WGC3Duint, void*);
1349 WGC3Duint, WGC3Denum, void*); 1360
1361 void* WebGraphicsContext3DCommandBufferImpl::mapImageCHROMIUM(
1362 WGC3Duint image_id,
1363 WGC3Denum access) {
1364 return gl_->MapImageCHROMIUM(image_id);
1365 }
1350 1366
1351 DELEGATE_TO_GL_1(unmapImageCHROMIUM, UnmapImageCHROMIUM, WGC3Duint); 1367 DELEGATE_TO_GL_1(unmapImageCHROMIUM, UnmapImageCHROMIUM, WGC3Duint);
1352 1368
1353 DELEGATE_TO_GL_6(framebufferTexture2DMultisampleEXT, 1369 DELEGATE_TO_GL_6(framebufferTexture2DMultisampleEXT,
1354 FramebufferTexture2DMultisampleEXT, 1370 FramebufferTexture2DMultisampleEXT,
1355 WGC3Denum, WGC3Denum, WGC3Denum, WebGLId, WGC3Dint, WGC3Dsizei) 1371 WGC3Denum, WGC3Denum, WGC3Denum, WebGLId, WGC3Dint, WGC3Dsizei)
1356 1372
1357 DELEGATE_TO_GL_5(renderbufferStorageMultisampleEXT, 1373 DELEGATE_TO_GL_5(renderbufferStorageMultisampleEXT,
1358 RenderbufferStorageMultisampleEXT, WGC3Denum, WGC3Dsizei, 1374 RenderbufferStorageMultisampleEXT, WGC3Denum, WGC3Dsizei,
1359 WGC3Denum, WGC3Dsizei, WGC3Dsizei) 1375 WGC3Denum, WGC3Dsizei, WGC3Dsizei)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 1415
1400 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1416 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1401 const std::string& message, int id) { 1417 const std::string& message, int id) {
1402 if (error_message_callback_) { 1418 if (error_message_callback_) {
1403 blink::WebString str = blink::WebString::fromUTF8(message.c_str()); 1419 blink::WebString str = blink::WebString::fromUTF8(message.c_str());
1404 error_message_callback_->onErrorMessage(str, id); 1420 error_message_callback_->onErrorMessage(str, id);
1405 } 1421 }
1406 } 1422 }
1407 1423
1408 } // namespace content 1424 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698