| 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 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1526 WebGLId, WGC3Dint, const WGC3Dchar*) | 1526 WebGLId, WGC3Dint, const WGC3Dchar*) |
| 1527 | 1527 |
| 1528 DELEGATE_TO_GL(shallowFlushCHROMIUM,ShallowFlushCHROMIUM); | 1528 DELEGATE_TO_GL(shallowFlushCHROMIUM,ShallowFlushCHROMIUM); |
| 1529 | 1529 |
| 1530 DELEGATE_TO_GL_1(genMailboxCHROMIUM, GenMailboxCHROMIUM, WGC3Dbyte*) | 1530 DELEGATE_TO_GL_1(genMailboxCHROMIUM, GenMailboxCHROMIUM, WGC3Dbyte*) |
| 1531 DELEGATE_TO_GL_2(produceTextureCHROMIUM, ProduceTextureCHROMIUM, | 1531 DELEGATE_TO_GL_2(produceTextureCHROMIUM, ProduceTextureCHROMIUM, |
| 1532 WGC3Denum, const WGC3Dbyte*) | 1532 WGC3Denum, const WGC3Dbyte*) |
| 1533 DELEGATE_TO_GL_2(consumeTextureCHROMIUM, ConsumeTextureCHROMIUM, | 1533 DELEGATE_TO_GL_2(consumeTextureCHROMIUM, ConsumeTextureCHROMIUM, |
| 1534 WGC3Denum, const WGC3Dbyte*) | 1534 WGC3Denum, const WGC3Dbyte*) |
| 1535 | 1535 |
| 1536 void WebGraphicsContext3DCommandBufferImpl::insertEventMarkerEXT( |
| 1537 const WGC3Dchar* marker) { |
| 1538 gl_->InsertEventMarkerEXT(0, marker); |
| 1539 } |
| 1540 |
| 1541 void WebGraphicsContext3DCommandBufferImpl::pushGroupMarkerEXT( |
| 1542 const WGC3Dchar* marker) { |
| 1543 gl_->PushGroupMarkerEXT(0, marker); |
| 1544 } |
| 1545 |
| 1546 DELEGATE_TO_GL(popGroupMarkerEXT, PopGroupMarkerEXT); |
| 1547 |
| 1536 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { | 1548 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { |
| 1537 return webkit_glue::CreateCommandBufferSkiaGLBinding(); | 1549 return webkit_glue::CreateCommandBufferSkiaGLBinding(); |
| 1538 } | 1550 } |
| 1539 | 1551 |
| 1540 namespace { | 1552 namespace { |
| 1541 | 1553 |
| 1542 WGC3Denum convertReason(gpu::error::ContextLostReason reason) { | 1554 WGC3Denum convertReason(gpu::error::ContextLostReason reason) { |
| 1543 switch (reason) { | 1555 switch (reason) { |
| 1544 case gpu::error::kGuilty: | 1556 case gpu::error::kGuilty: |
| 1545 return GL_GUILTY_CONTEXT_RESET_ARB; | 1557 return GL_GUILTY_CONTEXT_RESET_ARB; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1567 swap_client_->OnViewContextSwapBuffersAborted(); | 1579 swap_client_->OnViewContextSwapBuffersAborted(); |
| 1568 } | 1580 } |
| 1569 | 1581 |
| 1570 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( | 1582 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( |
| 1571 const std::string& message, int id) { | 1583 const std::string& message, int id) { |
| 1572 if (error_message_callback_) { | 1584 if (error_message_callback_) { |
| 1573 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); | 1585 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); |
| 1574 error_message_callback_->onErrorMessage(str, id); | 1586 error_message_callback_->onErrorMessage(str, id); |
| 1575 } | 1587 } |
| 1576 } | 1588 } |
| OLD | NEW |