Commit 99831dfa authored by Khushal's avatar Khushal Committed by Commit Bot

gpu: Disallow client share groups with RasterDecoder.

R=piman@chromium.org

Bug: 854416
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I2a34d72980d5acd8975319671cc9ca9637bf93c8
Reviewed-on: https://chromium-review.googlesource.com/1117706Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570992}
parent 1dd2d4f8
...@@ -84,25 +84,24 @@ gpu::ContextResult RasterCommandBufferStub::Initialize( ...@@ -84,25 +84,24 @@ gpu::ContextResult RasterCommandBufferStub::Initialize(
DCHECK(manager); DCHECK(manager);
if (share_command_buffer_stub) { if (share_command_buffer_stub) {
context_group_ = share_command_buffer_stub->context_group(); LOG(ERROR) << "Using a share group is not supported with RasterDecoder";
DCHECK(context_group_->bind_generates_resource() == return ContextResult::kFatalFailure;
init_params.attribs.bind_generates_resource);
} else {
scoped_refptr<gles2::FeatureInfo> feature_info = new gles2::FeatureInfo(
manager->gpu_driver_bug_workarounds(), manager->gpu_feature_info());
gpu::GpuMemoryBufferFactory* gmb_factory =
manager->gpu_memory_buffer_factory();
context_group_ = new gles2::ContextGroup(
manager->gpu_preferences(), gles2::PassthroughCommandDecoderSupported(),
manager->mailbox_manager(), CreateMemoryTracker(init_params),
manager->shader_translator_cache(),
manager->framebuffer_completeness_cache(), feature_info,
init_params.attribs.bind_generates_resource, channel_->image_manager(),
gmb_factory ? gmb_factory->AsImageFactory() : nullptr,
manager->watchdog() /* progress_reporter */,
manager->gpu_feature_info(), manager->discardable_manager());
} }
scoped_refptr<gles2::FeatureInfo> feature_info = new gles2::FeatureInfo(
manager->gpu_driver_bug_workarounds(), manager->gpu_feature_info());
gpu::GpuMemoryBufferFactory* gmb_factory =
manager->gpu_memory_buffer_factory();
context_group_ = new gles2::ContextGroup(
manager->gpu_preferences(), gles2::PassthroughCommandDecoderSupported(),
manager->mailbox_manager(), CreateMemoryTracker(init_params),
manager->shader_translator_cache(),
manager->framebuffer_completeness_cache(), feature_info,
init_params.attribs.bind_generates_resource, channel_->image_manager(),
gmb_factory ? gmb_factory->AsImageFactory() : nullptr,
manager->watchdog() /* progress_reporter */, manager->gpu_feature_info(),
manager->discardable_manager());
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
// Virtualize PreferIntegratedGpu contexts by default on OS X to prevent // Virtualize PreferIntegratedGpu contexts by default on OS X to prevent
// performance regressions when enabling FCM. // performance regressions when enabling FCM.
...@@ -143,11 +142,7 @@ gpu::ContextResult RasterCommandBufferStub::Initialize( ...@@ -143,11 +142,7 @@ gpu::ContextResult RasterCommandBufferStub::Initialize(
if (context_group_->use_passthrough_cmd_decoder()) { if (context_group_->use_passthrough_cmd_decoder()) {
// When using the passthrough command decoder, only share with other // When using the passthrough command decoder, only share with other
// contexts in the explicitly requested share group // contexts in the explicitly requested share group
if (share_command_buffer_stub) {
share_group_ = share_command_buffer_stub->share_group();
} else {
share_group_ = new gl::GLShareGroup(); share_group_ = new gl::GLShareGroup();
}
} else { } else {
// When using the validating command decoder, always use the global share // When using the validating command decoder, always use the global share
// group // group
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment