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

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

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/in_process_command_buffer.h" 5 #include "gpu/command_buffer/service/in_process_command_buffer.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 else 430 else
431 surface_ = gfx::GLSurface::CreateViewGLSurface(params.window); 431 surface_ = gfx::GLSurface::CreateViewGLSurface(params.window);
432 } 432 }
433 433
434 if (!surface_.get()) { 434 if (!surface_.get()) {
435 LOG(ERROR) << "Could not create GLSurface."; 435 LOG(ERROR) << "Could not create GLSurface.";
436 DestroyOnGpuThread(); 436 DestroyOnGpuThread();
437 return false; 437 return false;
438 } 438 }
439 439
440 if (service_->UseVirtualizedGLContexts()) { 440 if (service_->UseVirtualizedGLContexts() ||
441 decoder_->GetContextGroup()
442 ->feature_info()
443 ->workarounds()
444 .use_virtualized_gl_contexts) {
441 context_ = gl_share_group_->GetSharedContext(); 445 context_ = gl_share_group_->GetSharedContext();
442 if (!context_.get()) { 446 if (!context_.get()) {
443 context_ = gfx::GLContext::CreateGLContext( 447 context_ = gfx::GLContext::CreateGLContext(
444 gl_share_group_.get(), surface_.get(), params.gpu_preference); 448 gl_share_group_.get(), surface_.get(), params.gpu_preference);
445 gl_share_group_->SetSharedContext(context_.get()); 449 gl_share_group_->SetSharedContext(context_.get());
446 } 450 }
447 451
448 context_ = new GLContextVirtual( 452 context_ = new GLContextVirtual(
449 gl_share_group_.get(), context_.get(), decoder_->AsWeakPtr()); 453 gl_share_group_.get(), context_.get(), decoder_->AsWeakPtr());
450 if (context_->Initialize(surface_.get(), params.gpu_preference)) { 454 if (context_->Initialize(surface_.get(), params.gpu_preference)) {
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 949
946 #if defined(OS_ANDROID) 950 #if defined(OS_ANDROID)
947 scoped_refptr<gfx::SurfaceTexture> 951 scoped_refptr<gfx::SurfaceTexture>
948 InProcessCommandBuffer::GetSurfaceTexture(uint32 stream_id) { 952 InProcessCommandBuffer::GetSurfaceTexture(uint32 stream_id) {
949 DCHECK(stream_texture_manager_); 953 DCHECK(stream_texture_manager_);
950 return stream_texture_manager_->GetSurfaceTexture(stream_id); 954 return stream_texture_manager_->GetSurfaceTexture(stream_id);
951 } 955 }
952 #endif 956 #endif
953 957
954 } // namespace gpu 958 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698