OLD | NEW |
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 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1479 DELEGATE_TO_GL_1R(isQueryEXT, IsQueryEXT, WebGLId, WGC3Dboolean) | 1479 DELEGATE_TO_GL_1R(isQueryEXT, IsQueryEXT, WebGLId, WGC3Dboolean) |
1480 DELEGATE_TO_GL_2(beginQueryEXT, BeginQueryEXT, WGC3Denum, WebGLId) | 1480 DELEGATE_TO_GL_2(beginQueryEXT, BeginQueryEXT, WGC3Denum, WebGLId) |
1481 DELEGATE_TO_GL_1(endQueryEXT, EndQueryEXT, WGC3Denum) | 1481 DELEGATE_TO_GL_1(endQueryEXT, EndQueryEXT, WGC3Denum) |
1482 DELEGATE_TO_GL_3(getQueryivEXT, GetQueryivEXT, WGC3Denum, WGC3Denum, WGC3Dint*) | 1482 DELEGATE_TO_GL_3(getQueryivEXT, GetQueryivEXT, WGC3Denum, WGC3Denum, WGC3Dint*) |
1483 DELEGATE_TO_GL_3(getQueryObjectuivEXT, GetQueryObjectuivEXT, | 1483 DELEGATE_TO_GL_3(getQueryObjectuivEXT, GetQueryObjectuivEXT, |
1484 WebGLId, WGC3Denum, WGC3Duint*) | 1484 WebGLId, WGC3Denum, WGC3Duint*) |
1485 | 1485 |
1486 DELEGATE_TO_GL_5(copyTextureCHROMIUM, CopyTextureCHROMIUM, WGC3Denum, | 1486 DELEGATE_TO_GL_5(copyTextureCHROMIUM, CopyTextureCHROMIUM, WGC3Denum, |
1487 WebGLId, WebGLId, WGC3Dint, WGC3Denum); | 1487 WebGLId, WebGLId, WGC3Dint, WGC3Denum); |
1488 | 1488 |
1489 #if WEBKIT_USING_SKIA | |
1490 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { | 1489 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { |
1491 return webkit_glue::CreateCommandBufferSkiaGLBinding(); | 1490 return webkit_glue::CreateCommandBufferSkiaGLBinding(); |
1492 } | 1491 } |
1493 #endif | |
1494 | 1492 |
1495 namespace { | 1493 namespace { |
1496 | 1494 |
1497 WGC3Denum convertReason(gpu::error::ContextLostReason reason) { | 1495 WGC3Denum convertReason(gpu::error::ContextLostReason reason) { |
1498 switch (reason) { | 1496 switch (reason) { |
1499 case gpu::error::kGuilty: | 1497 case gpu::error::kGuilty: |
1500 return GL_GUILTY_CONTEXT_RESET_ARB; | 1498 return GL_GUILTY_CONTEXT_RESET_ARB; |
1501 case gpu::error::kInnocent: | 1499 case gpu::error::kInnocent: |
1502 return GL_INNOCENT_CONTEXT_RESET_ARB; | 1500 return GL_INNOCENT_CONTEXT_RESET_ARB; |
1503 case gpu::error::kUnknown: | 1501 case gpu::error::kUnknown: |
(...skipping 18 matching lines...) Expand all Loading... |
1522 swap_client_->OnViewContextSwapBuffersAborted(); | 1520 swap_client_->OnViewContextSwapBuffersAborted(); |
1523 } | 1521 } |
1524 | 1522 |
1525 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( | 1523 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( |
1526 const std::string& message, int id) { | 1524 const std::string& message, int id) { |
1527 if (error_message_callback_) { | 1525 if (error_message_callback_) { |
1528 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); | 1526 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); |
1529 error_message_callback_->onErrorMessage(str, id); | 1527 error_message_callback_->onErrorMessage(str, id); |
1530 } | 1528 } |
1531 } | 1529 } |
OLD | NEW |