OLD | NEW |
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/ipc/service/gpu_command_buffer_stub.h" | 5 #include "gpu/ipc/service/gpu_command_buffer_stub.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 channel_->gpu_channel_manager()->gpu_memory_buffer_factory(); | 562 channel_->gpu_channel_manager()->gpu_memory_buffer_factory(); |
563 context_group_ = new gles2::ContextGroup( | 563 context_group_ = new gles2::ContextGroup( |
564 manager->gpu_preferences(), channel_->mailbox_manager(), | 564 manager->gpu_preferences(), channel_->mailbox_manager(), |
565 new GpuCommandBufferMemoryTracker( | 565 new GpuCommandBufferMemoryTracker( |
566 channel_, command_buffer_id_.GetUnsafeValue(), | 566 channel_, command_buffer_id_.GetUnsafeValue(), |
567 init_params.attribs.context_type, channel_->task_runner()), | 567 init_params.attribs.context_type, channel_->task_runner()), |
568 manager->shader_translator_cache(), | 568 manager->shader_translator_cache(), |
569 manager->framebuffer_completeness_cache(), feature_info, | 569 manager->framebuffer_completeness_cache(), feature_info, |
570 init_params.attribs.bind_generates_resource, | 570 init_params.attribs.bind_generates_resource, |
571 gmb_factory ? gmb_factory->AsImageFactory() : nullptr, | 571 gmb_factory ? gmb_factory->AsImageFactory() : nullptr, |
572 channel_->watchdog() /* progress_reporter */); | 572 channel_->watchdog() /* progress_reporter */, |
| 573 manager->gpu_feature_info()); |
573 } | 574 } |
574 | 575 |
575 #if defined(OS_MACOSX) | 576 #if defined(OS_MACOSX) |
576 // Virtualize PreferIntegratedGpu contexts by default on OS X to prevent | 577 // Virtualize PreferIntegratedGpu contexts by default on OS X to prevent |
577 // performance regressions when enabling FCM. | 578 // performance regressions when enabling FCM. |
578 // http://crbug.com/180463 | 579 // http://crbug.com/180463 |
579 if (init_params.attribs.gpu_preference == gl::PreferIntegratedGpu) | 580 if (init_params.attribs.gpu_preference == gl::PreferIntegratedGpu) |
580 use_virtualized_gl_context_ = true; | 581 use_virtualized_gl_context_ = true; |
581 #endif | 582 #endif |
582 | 583 |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1202 command_buffer_->GetLastState().error == error::kLostContext) | 1203 command_buffer_->GetLastState().error == error::kLostContext) |
1203 return; | 1204 return; |
1204 | 1205 |
1205 command_buffer_->SetContextLostReason(error::kUnknown); | 1206 command_buffer_->SetContextLostReason(error::kUnknown); |
1206 if (decoder_) | 1207 if (decoder_) |
1207 decoder_->MarkContextLost(error::kUnknown); | 1208 decoder_->MarkContextLost(error::kUnknown); |
1208 command_buffer_->SetParseError(error::kLostContext); | 1209 command_buffer_->SetParseError(error::kLostContext); |
1209 } | 1210 } |
1210 | 1211 |
1211 } // namespace gpu | 1212 } // namespace gpu |
OLD | NEW |