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

Side by Side Diff: gpu/command_buffer/service/gl_context_virtual.cc

Issue 14241007: Return the shared context's handle when a virtualized context's (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "gpu/command_buffer/service/gl_context_virtual.h" 5 #include "gpu/command_buffer/service/gl_context_virtual.h"
6 6
7 #include "gpu/command_buffer/service/gl_state_restorer_impl.h" 7 #include "gpu/command_buffer/service/gl_state_restorer_impl.h"
8 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 8 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
9 #include "ui/gl/gl_surface.h" 9 #include "ui/gl/gl_surface.h"
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 return true; 66 return true;
67 67
68 gfx::GLSurface* current_surface = gfx::GLSurface::GetCurrent(); 68 gfx::GLSurface* current_surface = gfx::GLSurface::GetCurrent();
69 return surface->GetBackingFrameBufferObject() || 69 return surface->GetBackingFrameBufferObject() ||
70 surface->IsOffscreen() || 70 surface->IsOffscreen() ||
71 (current_surface && 71 (current_surface &&
72 current_surface->GetHandle() == surface->GetHandle()); 72 current_surface->GetHandle() == surface->GetHandle());
73 } 73 }
74 74
75 void* GLContextVirtual::GetHandle() { 75 void* GLContextVirtual::GetHandle() {
76 return NULL; 76 return shared_context_->GetHandle();
77 } 77 }
78 78
79 gfx::GLStateRestorer* GLContextVirtual::GetGLStateRestorer() { 79 gfx::GLStateRestorer* GLContextVirtual::GetGLStateRestorer() {
80 return state_restorer_.get(); 80 return state_restorer_.get();
81 } 81 }
82 82
83 void GLContextVirtual::SetSwapInterval(int interval) { 83 void GLContextVirtual::SetSwapInterval(int interval) {
84 shared_context_->SetSwapInterval(interval); 84 shared_context_->SetSwapInterval(interval);
85 } 85 }
86 86
(...skipping 14 matching lines...) Expand all
101 101
102 bool GLContextVirtual::WasAllocatedUsingRobustnessExtension() { 102 bool GLContextVirtual::WasAllocatedUsingRobustnessExtension() {
103 return shared_context_->WasAllocatedUsingRobustnessExtension(); 103 return shared_context_->WasAllocatedUsingRobustnessExtension();
104 } 104 }
105 105
106 GLContextVirtual::~GLContextVirtual() { 106 GLContextVirtual::~GLContextVirtual() {
107 Destroy(); 107 Destroy();
108 } 108 }
109 109
110 } // namespace gpu 110 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698