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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 context_group_ = new gles2::ContextGroup( | 582 context_group_ = new gles2::ContextGroup( |
583 manager->gpu_preferences(), channel_->mailbox_manager(), | 583 manager->gpu_preferences(), channel_->mailbox_manager(), |
584 new GpuCommandBufferMemoryTracker( | 584 new GpuCommandBufferMemoryTracker( |
585 channel_, command_buffer_id_.GetUnsafeValue(), | 585 channel_, command_buffer_id_.GetUnsafeValue(), |
586 init_params.attribs.context_type, channel_->task_runner()), | 586 init_params.attribs.context_type, channel_->task_runner()), |
587 manager->shader_translator_cache(), | 587 manager->shader_translator_cache(), |
588 manager->framebuffer_completeness_cache(), feature_info, | 588 manager->framebuffer_completeness_cache(), feature_info, |
589 init_params.attribs.bind_generates_resource, | 589 init_params.attribs.bind_generates_resource, |
590 gmb_factory ? gmb_factory->AsImageFactory() : nullptr, | 590 gmb_factory ? gmb_factory->AsImageFactory() : nullptr, |
591 channel_->watchdog() /* progress_reporter */, | 591 channel_->watchdog() /* progress_reporter */, |
592 manager->gpu_feature_info()); | 592 manager->gpu_feature_info(), channel_->discardable_manager()); |
593 } | 593 } |
594 | 594 |
595 #if defined(OS_MACOSX) | 595 #if defined(OS_MACOSX) |
596 // Virtualize PreferIntegratedGpu contexts by default on OS X to prevent | 596 // Virtualize PreferIntegratedGpu contexts by default on OS X to prevent |
597 // performance regressions when enabling FCM. | 597 // performance regressions when enabling FCM. |
598 // http://crbug.com/180463 | 598 // http://crbug.com/180463 |
599 if (init_params.attribs.gpu_preference == gl::PreferIntegratedGpu) | 599 if (init_params.attribs.gpu_preference == gl::PreferIntegratedGpu) |
600 use_virtualized_gl_context_ = true; | 600 use_virtualized_gl_context_ = true; |
601 #endif | 601 #endif |
602 | 602 |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1260 command_buffer_->GetLastState().error == error::kLostContext) | 1260 command_buffer_->GetLastState().error == error::kLostContext) |
1261 return; | 1261 return; |
1262 | 1262 |
1263 command_buffer_->SetContextLostReason(error::kUnknown); | 1263 command_buffer_->SetContextLostReason(error::kUnknown); |
1264 if (decoder_) | 1264 if (decoder_) |
1265 decoder_->MarkContextLost(error::kUnknown); | 1265 decoder_->MarkContextLost(error::kUnknown); |
1266 command_buffer_->SetParseError(error::kLostContext); | 1266 command_buffer_->SetParseError(error::kLostContext); |
1267 } | 1267 } |
1268 | 1268 |
1269 } // namespace gpu | 1269 } // namespace gpu |
OLD | NEW |