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

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

Issue 23480048: Remove the problematic call to GLSurface::GetBackingFrameBufferObject. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
« 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 void GLContextVirtual::ReleaseCurrent(gfx::GLSurface* surface) { 64 void GLContextVirtual::ReleaseCurrent(gfx::GLSurface* surface) {
65 if (IsCurrent(surface)) { 65 if (IsCurrent(surface)) {
66 shared_context_->OnReleaseVirtuallyCurrent(this); 66 shared_context_->OnReleaseVirtuallyCurrent(this);
67 shared_context_->ReleaseCurrent(surface); 67 shared_context_->ReleaseCurrent(surface);
68 } 68 }
69 } 69 }
70 70
71 bool GLContextVirtual::IsCurrent(gfx::GLSurface* surface) { 71 bool GLContextVirtual::IsCurrent(gfx::GLSurface* surface) {
72 // If it's a real surface it needs to be current. 72 // If it's a real surface it needs to be current.
73 if (surface && 73 if (surface &&
no sievers 2013/09/09 17:04:12 nit: I think this fits in one line now
74 !surface->IsOffscreen() && 74 !surface->IsOffscreen())
75 !surface->GetBackingFrameBufferObject())
76 return shared_context_->IsCurrent(surface); 75 return shared_context_->IsCurrent(surface);
77 76
78 // Otherwise, only insure the context itself is current. 77 // Otherwise, only insure the context itself is current.
79 return shared_context_->IsCurrent(NULL); 78 return shared_context_->IsCurrent(NULL);
80 } 79 }
81 80
82 void* GLContextVirtual::GetHandle() { 81 void* GLContextVirtual::GetHandle() {
83 return shared_context_->GetHandle(); 82 return shared_context_->GetHandle();
84 } 83 }
85 84
(...skipping 22 matching lines...) Expand all
108 107
109 void GLContextVirtual::SetUnbindFboOnMakeCurrent() { 108 void GLContextVirtual::SetUnbindFboOnMakeCurrent() {
110 shared_context_->SetUnbindFboOnMakeCurrent(); 109 shared_context_->SetUnbindFboOnMakeCurrent();
111 } 110 }
112 111
113 GLContextVirtual::~GLContextVirtual() { 112 GLContextVirtual::~GLContextVirtual() {
114 Destroy(); 113 Destroy();
115 } 114 }
116 115
117 } // namespace gpu 116 } // 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