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