| 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 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1547 } | 1547 } |
| 1548 | 1548 |
| 1549 void WebGraphicsContext3DCommandBufferImpl::deleteVertexArrayOES( | 1549 void WebGraphicsContext3DCommandBufferImpl::deleteVertexArrayOES( |
| 1550 WebGLId array) { | 1550 WebGLId array) { |
| 1551 gl_->DeleteVertexArraysOES(1, &array); | 1551 gl_->DeleteVertexArraysOES(1, &array); |
| 1552 } | 1552 } |
| 1553 | 1553 |
| 1554 DELEGATE_TO_GL_1R(isVertexArrayOES, IsVertexArrayOES, WebGLId, WGC3Dboolean) | 1554 DELEGATE_TO_GL_1R(isVertexArrayOES, IsVertexArrayOES, WebGLId, WGC3Dboolean) |
| 1555 DELEGATE_TO_GL_1(bindVertexArrayOES, BindVertexArrayOES, WebGLId) | 1555 DELEGATE_TO_GL_1(bindVertexArrayOES, BindVertexArrayOES, WebGLId) |
| 1556 | 1556 |
| 1557 DELEGATE_TO_GL_2(bindTexImage2DCHROMIUM, BindTexImage2DCHROMIUM, |
| 1558 WGC3Denum, WGC3Dint) |
| 1559 DELEGATE_TO_GL_2(releaseTexImage2DCHROMIUM, ReleaseTexImage2DCHROMIUM, |
| 1560 WGC3Denum, WGC3Dint) |
| 1561 |
| 1557 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { | 1562 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { |
| 1558 return webkit_glue::CreateCommandBufferSkiaGLBinding(); | 1563 return webkit_glue::CreateCommandBufferSkiaGLBinding(); |
| 1559 } | 1564 } |
| 1560 | 1565 |
| 1561 namespace { | 1566 namespace { |
| 1562 | 1567 |
| 1563 WGC3Denum convertReason(gpu::error::ContextLostReason reason) { | 1568 WGC3Denum convertReason(gpu::error::ContextLostReason reason) { |
| 1564 switch (reason) { | 1569 switch (reason) { |
| 1565 case gpu::error::kGuilty: | 1570 case gpu::error::kGuilty: |
| 1566 return GL_GUILTY_CONTEXT_RESET_ARB; | 1571 return GL_GUILTY_CONTEXT_RESET_ARB; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1588 swap_client_->OnViewContextSwapBuffersAborted(); | 1593 swap_client_->OnViewContextSwapBuffersAborted(); |
| 1589 } | 1594 } |
| 1590 | 1595 |
| 1591 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( | 1596 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( |
| 1592 const std::string& message, int id) { | 1597 const std::string& message, int id) { |
| 1593 if (error_message_callback_) { | 1598 if (error_message_callback_) { |
| 1594 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); | 1599 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); |
| 1595 error_message_callback_->onErrorMessage(str, id); | 1600 error_message_callback_->onErrorMessage(str, id); |
| 1596 } | 1601 } |
| 1597 } | 1602 } |
| OLD | NEW |