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

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

Issue 10543125: gpu: Add support for GLX_EXT_texture_from_pixmap extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1485 DELEGATE_TO_GL_1R(isQueryEXT, IsQueryEXT, WebGLId, WGC3Dboolean) 1485 DELEGATE_TO_GL_1R(isQueryEXT, IsQueryEXT, WebGLId, WGC3Dboolean)
1486 DELEGATE_TO_GL_2(beginQueryEXT, BeginQueryEXT, WGC3Denum, WebGLId) 1486 DELEGATE_TO_GL_2(beginQueryEXT, BeginQueryEXT, WGC3Denum, WebGLId)
1487 DELEGATE_TO_GL_1(endQueryEXT, EndQueryEXT, WGC3Denum) 1487 DELEGATE_TO_GL_1(endQueryEXT, EndQueryEXT, WGC3Denum)
1488 DELEGATE_TO_GL_3(getQueryivEXT, GetQueryivEXT, WGC3Denum, WGC3Denum, WGC3Dint*) 1488 DELEGATE_TO_GL_3(getQueryivEXT, GetQueryivEXT, WGC3Denum, WGC3Denum, WGC3Dint*)
1489 DELEGATE_TO_GL_3(getQueryObjectuivEXT, GetQueryObjectuivEXT, 1489 DELEGATE_TO_GL_3(getQueryObjectuivEXT, GetQueryObjectuivEXT,
1490 WebGLId, WGC3Denum, WGC3Duint*) 1490 WebGLId, WGC3Denum, WGC3Duint*)
1491 1491
1492 DELEGATE_TO_GL_5(copyTextureCHROMIUM, CopyTextureCHROMIUM, WGC3Denum, 1492 DELEGATE_TO_GL_5(copyTextureCHROMIUM, CopyTextureCHROMIUM, WGC3Denum,
1493 WebGLId, WebGLId, WGC3Dint, WGC3Denum); 1493 WebGLId, WebGLId, WGC3Dint, WGC3Denum);
1494 1494
1495 DELEGATE_TO_GL_2(texImagePixmap2DCHROMIUM, TexImagePixmap2DCHROMIUM,
1496 WGC3Denum, WGC3Duint)
1497
1495 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { 1498 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() {
1496 return webkit_glue::CreateCommandBufferSkiaGLBinding(); 1499 return webkit_glue::CreateCommandBufferSkiaGLBinding();
1497 } 1500 }
1498 1501
1499 namespace { 1502 namespace {
1500 1503
1501 WGC3Denum convertReason(gpu::error::ContextLostReason reason) { 1504 WGC3Denum convertReason(gpu::error::ContextLostReason reason) {
1502 switch (reason) { 1505 switch (reason) {
1503 case gpu::error::kGuilty: 1506 case gpu::error::kGuilty:
1504 return GL_GUILTY_CONTEXT_RESET_ARB; 1507 return GL_GUILTY_CONTEXT_RESET_ARB;
(...skipping 21 matching lines...) Expand all
1526 swap_client_->OnViewContextSwapBuffersAborted(); 1529 swap_client_->OnViewContextSwapBuffersAborted();
1527 } 1530 }
1528 1531
1529 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1532 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1530 const std::string& message, int id) { 1533 const std::string& message, int id) {
1531 if (error_message_callback_) { 1534 if (error_message_callback_) {
1532 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); 1535 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str());
1533 error_message_callback_->onErrorMessage(str, id); 1536 error_message_callback_->onErrorMessage(str, id);
1534 } 1537 }
1535 } 1538 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698