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

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

Issue 169403005: command_buffer: Implement path rendering functions for CHROMIUM_path_rendering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nv-pr-02-texgen
Patch Set: rebase and cleanup ids Created 6 years, 2 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 "gpu/command_buffer/service/context_group.h" 5 #include "gpu/command_buffer/service/context_group.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "base/sys_info.h" 12 #include "base/sys_info.h"
13 #include "gpu/command_buffer/service/buffer_manager.h" 13 #include "gpu/command_buffer/service/buffer_manager.h"
14 #include "gpu/command_buffer/service/framebuffer_manager.h" 14 #include "gpu/command_buffer/service/framebuffer_manager.h"
15 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 15 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
16 #include "gpu/command_buffer/service/gpu_switches.h" 16 #include "gpu/command_buffer/service/gpu_switches.h"
17 #include "gpu/command_buffer/service/mailbox_manager.h" 17 #include "gpu/command_buffer/service/mailbox_manager.h"
18 #include "gpu/command_buffer/service/memory_tracking.h" 18 #include "gpu/command_buffer/service/memory_tracking.h"
19 #include "gpu/command_buffer/service/path_manager.h"
19 #include "gpu/command_buffer/service/program_manager.h" 20 #include "gpu/command_buffer/service/program_manager.h"
20 #include "gpu/command_buffer/service/renderbuffer_manager.h" 21 #include "gpu/command_buffer/service/renderbuffer_manager.h"
21 #include "gpu/command_buffer/service/shader_manager.h" 22 #include "gpu/command_buffer/service/shader_manager.h"
22 #include "gpu/command_buffer/service/texture_manager.h" 23 #include "gpu/command_buffer/service/texture_manager.h"
23 #include "gpu/command_buffer/service/transfer_buffer_manager.h" 24 #include "gpu/command_buffer/service/transfer_buffer_manager.h"
24 #include "ui/gl/gl_implementation.h" 25 #include "ui/gl/gl_implementation.h"
25 26
26 namespace gpu { 27 namespace gpu {
27 namespace gles2 { 28 namespace gles2 {
28 29
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 max_varying_vectors_, 228 max_varying_vectors_,
228 static_cast<uint32>(feature_info_->workarounds().max_varying_vectors)); 229 static_cast<uint32>(feature_info_->workarounds().max_varying_vectors));
229 } 230 }
230 if (feature_info_->workarounds().max_vertex_uniform_vectors) { 231 if (feature_info_->workarounds().max_vertex_uniform_vectors) {
231 max_vertex_uniform_vectors_ = 232 max_vertex_uniform_vectors_ =
232 std::min(max_vertex_uniform_vectors_, 233 std::min(max_vertex_uniform_vectors_,
233 static_cast<uint32>( 234 static_cast<uint32>(
234 feature_info_->workarounds().max_vertex_uniform_vectors)); 235 feature_info_->workarounds().max_vertex_uniform_vectors));
235 } 236 }
236 237
238 path_manager_.reset(new PathManager());
239
237 program_manager_.reset(new ProgramManager( 240 program_manager_.reset(new ProgramManager(
238 program_cache_, max_varying_vectors_)); 241 program_cache_, max_varying_vectors_));
239 242
240 if (!texture_manager_->Initialize()) { 243 if (!texture_manager_->Initialize()) {
241 LOG(ERROR) << "Context::Group::Initialize failed because texture manager " 244 LOG(ERROR) << "Context::Group::Initialize failed because texture manager "
242 << "failed to initialize."; 245 << "failed to initialize.";
243 return false; 246 return false;
244 } 247 }
245 248
246 decoders_.push_back(base::AsWeakPtr<GLES2Decoder>(decoder)); 249 decoders_.push_back(base::AsWeakPtr<GLES2Decoder>(decoder));
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 if (renderbuffer_manager_ != NULL) { 301 if (renderbuffer_manager_ != NULL) {
299 renderbuffer_manager_->Destroy(have_context); 302 renderbuffer_manager_->Destroy(have_context);
300 renderbuffer_manager_.reset(); 303 renderbuffer_manager_.reset();
301 } 304 }
302 305
303 if (texture_manager_ != NULL) { 306 if (texture_manager_ != NULL) {
304 texture_manager_->Destroy(have_context); 307 texture_manager_->Destroy(have_context);
305 texture_manager_.reset(); 308 texture_manager_.reset();
306 } 309 }
307 310
311 if (path_manager_ != NULL) {
312 path_manager_->Destroy(have_context);
313 path_manager_.reset();
314 }
315
308 if (program_manager_ != NULL) { 316 if (program_manager_ != NULL) {
309 program_manager_->Destroy(have_context); 317 program_manager_->Destroy(have_context);
310 program_manager_.reset(); 318 program_manager_.reset();
311 } 319 }
312 320
313 if (shader_manager_ != NULL) { 321 if (shader_manager_ != NULL) {
314 shader_manager_->Destroy(have_context); 322 shader_manager_->Destroy(have_context);
315 shader_manager_.reset(); 323 shader_manager_.reset();
316 } 324 }
317 325
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 GLenum pname, GLint min_required, uint32* v) { 379 GLenum pname, GLint min_required, uint32* v) {
372 uint32 value = 0; 380 uint32 value = 0;
373 GetIntegerv(pname, &value); 381 GetIntegerv(pname, &value);
374 bool result = CheckGLFeatureU(min_required, &value); 382 bool result = CheckGLFeatureU(min_required, &value);
375 *v = value; 383 *v = value;
376 return result; 384 return result;
377 } 385 }
378 386
379 } // namespace gles2 387 } // namespace gles2
380 } // namespace gpu 388 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698