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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 455783002: GPU context creation code duplication cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Fix even more build dependencies Created 6 years, 4 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 // A class to emulate GLES2 over command buffers. 5 // A class to emulate GLES2 over command buffers.
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 8
9 #include <GLES2/gl2ext.h> 9 #include <GLES2/gl2ext.h>
10 #include <GLES2/gl2extchromium.h> 10 #include <GLES2/gl2extchromium.h>
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 ss << std::hex << this; 128 ss << std::hex << this;
129 this_in_hex_ = ss.str(); 129 this_in_hex_ = ss.str();
130 130
131 GPU_CLIENT_LOG_CODE_BLOCK({ 131 GPU_CLIENT_LOG_CODE_BLOCK({
132 debug_ = CommandLine::ForCurrentProcess()->HasSwitch( 132 debug_ = CommandLine::ForCurrentProcess()->HasSwitch(
133 switches::kEnableGPUClientLogging); 133 switches::kEnableGPUClientLogging);
134 }); 134 });
135 135
136 share_group_ = 136 share_group_ =
137 (share_group ? share_group : new ShareGroup(bind_generates_resource)); 137 (share_group ? share_group : new ShareGroup(bind_generates_resource));
138 DCHECK(share_group_->bind_generates_resource() == bind_generates_resource);
138 139
139 memset(&reserved_ids_, 0, sizeof(reserved_ids_)); 140 memset(&reserved_ids_, 0, sizeof(reserved_ids_));
140 } 141 }
141 142
142 bool GLES2Implementation::Initialize( 143 bool GLES2Implementation::Initialize(
143 unsigned int starting_transfer_buffer_size, 144 unsigned int starting_transfer_buffer_size,
144 unsigned int min_transfer_buffer_size, 145 unsigned int min_transfer_buffer_size,
145 unsigned int max_transfer_buffer_size, 146 unsigned int max_transfer_buffer_size,
146 unsigned int mapped_memory_limit) { 147 unsigned int mapped_memory_limit) {
147 TRACE_EVENT0("gpu", "GLES2Implementation::Initialize"); 148 TRACE_EVENT0("gpu", "GLES2Implementation::Initialize");
(...skipping 4041 matching lines...) Expand 10 before | Expand all | Expand 10 after
4189 return true; 4190 return true;
4190 } 4191 }
4191 4192
4192 // Include the auto-generated part of this file. We split this because it means 4193 // Include the auto-generated part of this file. We split this because it means
4193 // we can easily edit the non-auto generated parts right here in this file 4194 // we can easily edit the non-auto generated parts right here in this file
4194 // instead of having to edit some template or the code generator. 4195 // instead of having to edit some template or the code generator.
4195 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" 4196 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h"
4196 4197
4197 } // namespace gles2 4198 } // namespace gles2
4198 } // namespace gpu 4199 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gl_in_process_context.cc ('k') | gpu/command_buffer/client/gles2_implementation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698