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

Side by Side Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc

Issue 1505933003: Labeled WebGraphicsContext3D context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc » ('j') | 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 "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 5 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
6 6
7 #include "third_party/khronos/GLES2/gl2.h" 7 #include "third_party/khronos/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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 command_buffer_->SetContextLostCallback( 148 command_buffer_->SetContextLostCallback(
149 base::Bind(&WebGraphicsContext3DCommandBufferImpl::OnContextLost, 149 base::Bind(&WebGraphicsContext3DCommandBufferImpl::OnContextLost,
150 weak_ptr_factory_.GetWeakPtr())); 150 weak_ptr_factory_.GetWeakPtr()));
151 151
152 command_buffer_->SetOnConsoleMessageCallback( 152 command_buffer_->SetOnConsoleMessageCallback(
153 base::Bind(&WebGraphicsContext3DCommandBufferImpl::OnErrorMessage, 153 base::Bind(&WebGraphicsContext3DCommandBufferImpl::OnErrorMessage,
154 weak_ptr_factory_.GetWeakPtr())); 154 weak_ptr_factory_.GetWeakPtr()));
155 155
156 real_gl_->SetErrorMessageCallback(getErrorMessageCallback()); 156 real_gl_->SetErrorMessageCallback(getErrorMessageCallback());
157 real_gl_->TraceBeginCHROMIUM("WebGraphicsContext3D",
no sievers 2015/12/08 22:17:42 and this doesn't need 'end'?
David Yen 2015/12/08 22:20:40 It automatically ends when the context is destroye
158 "CommandBufferContext");
157 159
158 visible_ = true; 160 visible_ = true;
159 initialized_ = true; 161 initialized_ = true;
160 return true; 162 return true;
161 } 163 }
162 164
163 bool WebGraphicsContext3DCommandBufferImpl::InitializeCommandBuffer( 165 bool WebGraphicsContext3DCommandBufferImpl::InitializeCommandBuffer(
164 bool onscreen, WebGraphicsContext3DCommandBufferImpl* share_context) { 166 bool onscreen, WebGraphicsContext3DCommandBufferImpl* share_context) {
165 if (!host_.get()) 167 if (!host_.get())
166 return false; 168 return false;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 { 368 {
367 base::AutoLock lock(g_default_share_groups_lock.Get()); 369 base::AutoLock lock(g_default_share_groups_lock.Get());
368 g_default_share_groups.Get().erase(host_.get()); 370 g_default_share_groups.Get().erase(host_.get());
369 } 371 }
370 372
371 gpu::CommandBuffer::State state = command_buffer_->GetLastState(); 373 gpu::CommandBuffer::State state = command_buffer_->GetLastState();
372 UmaRecordContextLost(context_type_, state.error, state.context_lost_reason); 374 UmaRecordContextLost(context_type_, state.error, state.context_lost_reason);
373 } 375 }
374 376
375 } // namespace content 377 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698