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

Side by Side Diff: content/renderer/gpu/renderer_gl_context.cc

Issue 9192014: Replace WGC3D visibility extension with resource_usage extension. [Part 2 of 3] (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added image_transport_surface_win changes Created 8 years, 11 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
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 "content/renderer/gpu/renderer_gl_context.h" 5 #include "content/renderer/gpu/renderer_gl_context.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 if (channel_->state() == GpuChannelHost::kLost) 255 if (channel_->state() == GpuChannelHost::kLost)
256 return true; 256 return true;
257 gpu::CommandBuffer::State state = command_buffer_->GetLastState(); 257 gpu::CommandBuffer::State state = command_buffer_->GetLastState();
258 return state.error == gpu::error::kLostContext; 258 return state.error == gpu::error::kLostContext;
259 } 259 }
260 260
261 CommandBufferProxy* RendererGLContext::GetCommandBufferProxy() { 261 CommandBufferProxy* RendererGLContext::GetCommandBufferProxy() {
262 return command_buffer_; 262 return command_buffer_;
263 } 263 }
264 264
265 bool RendererGLContext::SetSurfaceVisible(bool visible) { 265 bool RendererGLContext::SetResourceUsage(
266 return GetCommandBufferProxy()->SetSurfaceVisible(visible); 266 gfx::GLSurface::ResourceUsage resourceUsage) {
267 return GetCommandBufferProxy()->SetResourceUsage(resourceUsage);
267 } 268 }
268 269
269 // TODO(gman): Remove This 270 // TODO(gman): Remove This
270 void RendererGLContext::DisableShaderTranslation() { 271 void RendererGLContext::DisableShaderTranslation() {
271 NOTREACHED(); 272 NOTREACHED();
272 } 273 }
273 274
274 gpu::gles2::GLES2Implementation* RendererGLContext::GetImplementation() { 275 gpu::gles2::GLES2Implementation* RendererGLContext::GetImplementation() {
275 return gles2_implementation_; 276 return gles2_implementation_;
276 } 277 }
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 void RendererGLContext::OnContextLost() { 457 void RendererGLContext::OnContextLost() {
457 if (!context_lost_callback_.is_null()) { 458 if (!context_lost_callback_.is_null()) {
458 RendererGLContext::ContextLostReason reason = kUnknown; 459 RendererGLContext::ContextLostReason reason = kUnknown;
459 if (command_buffer_) { 460 if (command_buffer_) {
460 reason = ConvertReason( 461 reason = ConvertReason(
461 command_buffer_->GetLastState().context_lost_reason); 462 command_buffer_->GetLastState().context_lost_reason);
462 } 463 }
463 context_lost_callback_.Run(reason); 464 context_lost_callback_.Run(reason);
464 } 465 }
465 } 466 }
OLDNEW
« no previous file with comments | « content/renderer/gpu/renderer_gl_context.h ('k') | content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698