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

Side by Side Diff: webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc

Issue 7756004: Create a new GrGLInterface for each GrContext so callback can be used to set GL-context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: switch machines Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #if defined(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" 7 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h"
8 8
9 #include <GLES2/gl2.h> 9 #include <GLES2/gl2.h>
10 #ifndef GL_GLEXT_PROTOTYPES 10 #ifndef GL_GLEXT_PROTOTYPES
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 context_lost_callback_ = cb; 1572 context_lost_callback_ = cb;
1573 } 1573 }
1574 1574
1575 WGC3Denum WebGraphicsContext3DInProcessCommandBufferImpl:: 1575 WGC3Denum WebGraphicsContext3DInProcessCommandBufferImpl::
1576 getGraphicsResetStatusARB() { 1576 getGraphicsResetStatusARB() {
1577 return context_lost_reason_; 1577 return context_lost_reason_;
1578 } 1578 }
1579 1579
1580 #if WEBKIT_USING_SKIA 1580 #if WEBKIT_USING_SKIA
1581 GrGLInterface* WebGraphicsContext3DInProcessCommandBufferImpl:: 1581 GrGLInterface* WebGraphicsContext3DInProcessCommandBufferImpl::
1582 grGLInterface() { 1582 onCreateGrGLInterface() {
1583 return webkit_glue::GetCommandBufferSkiaGLBinding(); 1583 return webkit_glue::CreateCommandBufferSkiaGLBinding();
1584 } 1584 }
1585 #endif 1585 #endif
1586 1586
1587 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() { 1587 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() {
1588 // TODO(kbr): improve the precision here. 1588 // TODO(kbr): improve the precision here.
1589 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; 1589 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB;
1590 if (context_lost_callback_) { 1590 if (context_lost_callback_) {
1591 context_lost_callback_->onContextLost(); 1591 context_lost_callback_->onContextLost();
1592 } 1592 }
1593 } 1593 }
1594 1594
1595 } // namespace gpu 1595 } // namespace gpu
1596 } // namespace webkit 1596 } // namespace webkit
1597 1597
1598 #endif // defined(ENABLE_GPU) 1598 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h ('k') | webkit/gpu/webgraphicscontext3d_in_process_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698