OLD | NEW |
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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <queue> | 10 #include <queue> |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 sync_point_client_ = service_->sync_point_manager()->CreateSyncPointClient( | 367 sync_point_client_ = service_->sync_point_manager()->CreateSyncPointClient( |
368 sync_point_order_data_, GetNamespaceID(), GetCommandBufferID()); | 368 sync_point_order_data_, GetNamespaceID(), GetCommandBufferID()); |
369 | 369 |
370 if (service_->UseVirtualizedGLContexts() || | 370 if (service_->UseVirtualizedGLContexts() || |
371 decoder_->GetContextGroup() | 371 decoder_->GetContextGroup() |
372 ->feature_info() | 372 ->feature_info() |
373 ->workarounds() | 373 ->workarounds() |
374 .use_virtualized_gl_contexts) { | 374 .use_virtualized_gl_contexts) { |
375 context_ = gl_share_group_->GetSharedContext(); | 375 context_ = gl_share_group_->GetSharedContext(); |
376 if (!context_.get()) { | 376 if (!context_.get()) { |
377 context_ = gfx::GLContext::CreateGLContext( | 377 gl_share_group_->UpdateActiveSharedContext(surface_.get(), |
378 gl_share_group_.get(), surface_.get(), params.gpu_preference); | 378 params.gpu_preference); |
379 gl_share_group_->SetSharedContext(context_.get()); | 379 context_ = gl_share_group_->GetSharedContext(); |
380 } | 380 } |
381 | 381 |
382 context_ = new GLContextVirtual( | 382 context_ = new GLContextVirtual( |
383 gl_share_group_.get(), context_.get(), decoder_->AsWeakPtr()); | 383 gl_share_group_.get(), context_.get(), decoder_->AsWeakPtr()); |
384 if (context_->Initialize(surface_.get(), params.gpu_preference)) { | 384 if (context_->Initialize(surface_.get(), params.gpu_preference)) { |
385 VLOG(1) << "Created virtual GL context."; | 385 VLOG(1) << "Created virtual GL context."; |
386 } else { | 386 } else { |
387 context_ = NULL; | 387 context_ = NULL; |
388 } | 388 } |
389 } else { | 389 } else { |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 framebuffer_completeness_cache_ = | 1080 framebuffer_completeness_cache_ = |
1081 new gpu::gles2::FramebufferCompletenessCache; | 1081 new gpu::gles2::FramebufferCompletenessCache; |
1082 return framebuffer_completeness_cache_; | 1082 return framebuffer_completeness_cache_; |
1083 } | 1083 } |
1084 | 1084 |
1085 SyncPointManager* GpuInProcessThread::sync_point_manager() { | 1085 SyncPointManager* GpuInProcessThread::sync_point_manager() { |
1086 return sync_point_manager_; | 1086 return sync_point_manager_; |
1087 } | 1087 } |
1088 | 1088 |
1089 } // namespace gpu | 1089 } // namespace gpu |
OLD | NEW |