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 "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" | 5 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" |
6 | 6 |
7 #include <GLES2/gl2.h> | 7 #include <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 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1549 getGraphicsResetStatusARB() { | 1549 getGraphicsResetStatusARB() { |
1550 return context_lost_reason_; | 1550 return context_lost_reason_; |
1551 } | 1551 } |
1552 | 1552 |
1553 DELEGATE_TO_GL_5(texImageIOSurface2DCHROMIUM, TexImageIOSurface2DCHROMIUM, | 1553 DELEGATE_TO_GL_5(texImageIOSurface2DCHROMIUM, TexImageIOSurface2DCHROMIUM, |
1554 WGC3Denum, WGC3Dint, WGC3Dint, WGC3Duint, WGC3Duint) | 1554 WGC3Denum, WGC3Dint, WGC3Dint, WGC3Duint, WGC3Duint) |
1555 | 1555 |
1556 DELEGATE_TO_GL_5(texStorage2DEXT, TexStorage2DEXT, | 1556 DELEGATE_TO_GL_5(texStorage2DEXT, TexStorage2DEXT, |
1557 WGC3Denum, WGC3Dint, WGC3Duint, WGC3Dint, WGC3Dint) | 1557 WGC3Denum, WGC3Dint, WGC3Duint, WGC3Dint, WGC3Dint) |
1558 | 1558 |
| 1559 WebGLId WebGraphicsContext3DInProcessCommandBufferImpl::createQueryEXT() { |
| 1560 GLuint o; |
| 1561 gl_->GenQueriesEXT(1, &o); |
| 1562 return o; |
| 1563 } |
| 1564 |
| 1565 void WebGraphicsContext3DInProcessCommandBufferImpl:: |
| 1566 deleteQueryEXT(WebGLId query) { |
| 1567 gl_->DeleteQueriesEXT(1, &query); |
| 1568 } |
| 1569 |
| 1570 DELEGATE_TO_GL_1R(isQueryEXT, IsQueryEXT, WebGLId, WGC3Dboolean) |
| 1571 DELEGATE_TO_GL_2(beginQueryEXT, BeginQueryEXT, WGC3Denum, WebGLId) |
| 1572 DELEGATE_TO_GL_1(endQueryEXT, EndQueryEXT, WGC3Denum) |
| 1573 DELEGATE_TO_GL_3(getQueryivEXT, GetQueryivEXT, WGC3Denum, WGC3Denum, WGC3Dint*) |
| 1574 DELEGATE_TO_GL_3(getQueryObjectuivEXT, GetQueryObjectuivEXT, |
| 1575 WebGLId, WGC3Denum, WGC3Duint*) |
| 1576 |
1559 #if WEBKIT_USING_SKIA | 1577 #if WEBKIT_USING_SKIA |
1560 GrGLInterface* WebGraphicsContext3DInProcessCommandBufferImpl:: | 1578 GrGLInterface* WebGraphicsContext3DInProcessCommandBufferImpl:: |
1561 onCreateGrGLInterface() { | 1579 onCreateGrGLInterface() { |
1562 return webkit_glue::CreateCommandBufferSkiaGLBinding(); | 1580 return webkit_glue::CreateCommandBufferSkiaGLBinding(); |
1563 } | 1581 } |
1564 #endif | 1582 #endif |
1565 | 1583 |
1566 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() { | 1584 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() { |
1567 // TODO(kbr): improve the precision here. | 1585 // TODO(kbr): improve the precision here. |
1568 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; | 1586 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; |
1569 if (context_lost_callback_) { | 1587 if (context_lost_callback_) { |
1570 context_lost_callback_->onContextLost(); | 1588 context_lost_callback_->onContextLost(); |
1571 } | 1589 } |
1572 } | 1590 } |
1573 | 1591 |
1574 } // namespace gpu | 1592 } // namespace gpu |
1575 } // namespace webkit | 1593 } // namespace webkit |
OLD | NEW |