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

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

Issue 1841643003: Remove unused fields from WebGraphicsContext3D::Attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webgl/WebGLContextAttributeHelpers.cpp » ('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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 : lose_context_when_out_of_memory_(lose_context_when_out_of_memory), 91 : lose_context_when_out_of_memory_(lose_context_when_out_of_memory),
92 attributes_(attributes), 92 attributes_(attributes),
93 host_(host), 93 host_(host),
94 surface_handle_(surface_handle), 94 surface_handle_(surface_handle),
95 active_url_(active_url), 95 active_url_(active_url),
96 context_type_(CONTEXT_TYPE_UNKNOWN), 96 context_type_(CONTEXT_TYPE_UNKNOWN),
97 gpu_preference_(attributes.preferDiscreteGPU ? gfx::PreferDiscreteGpu 97 gpu_preference_(attributes.preferDiscreteGPU ? gfx::PreferDiscreteGpu
98 : gfx::PreferIntegratedGpu), 98 : gfx::PreferIntegratedGpu),
99 mem_limits_(limits), 99 mem_limits_(limits),
100 weak_ptr_factory_(this) { 100 weak_ptr_factory_(this) {
101 if (attributes_.webGL) 101 if (attributes_.webGLVersion > 0)
102 context_type_ = OFFSCREEN_CONTEXT_FOR_WEBGL; 102 context_type_ = OFFSCREEN_CONTEXT_FOR_WEBGL;
103 if (share_context) { 103 if (share_context) {
104 DCHECK(!attributes_.shareResources); 104 DCHECK(!attributes_.shareResources);
105 share_group_ = share_context->share_group_; 105 share_group_ = share_context->share_group_;
106 } else { 106 } else {
107 share_group_ = attributes_.shareResources 107 share_group_ = attributes_.shareResources
108 ? GetDefaultShareGroupForHost(host) 108 ? GetDefaultShareGroupForHost(host)
109 : scoped_refptr<WebGraphicsContext3DCommandBufferImpl::ShareGroup>( 109 : scoped_refptr<WebGraphicsContext3DCommandBufferImpl::ShareGroup>(
110 new ShareGroup()); 110 new ShareGroup());
111 } 111 }
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 { 354 {
355 base::AutoLock lock(g_default_share_groups_lock.Get()); 355 base::AutoLock lock(g_default_share_groups_lock.Get());
356 g_default_share_groups.Get().erase(host_.get()); 356 g_default_share_groups.Get().erase(host_.get());
357 } 357 }
358 358
359 gpu::CommandBuffer::State state = command_buffer_->GetLastState(); 359 gpu::CommandBuffer::State state = command_buffer_->GetLastState();
360 UmaRecordContextLost(context_type_, state.error, state.context_lost_reason); 360 UmaRecordContextLost(context_type_, state.error, state.context_lost_reason);
361 } 361 }
362 362
363 } // namespace content 363 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webgl/WebGLContextAttributeHelpers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698