diff options
| author | rockot <rockot@chromium.org> | 2016-03-13 16:40:53 -0700 |
|---|---|---|
| committer | Commit bot <commit-bot@chromium.org> | 2016-03-13 23:41:58 +0000 |
| commit | f749fe6715f1f3c81bda3576fd60f260ac47282a (patch) | |
| tree | ef65540d2d3295c28b511cc59d0fc8bde771d6b5 /content/gpu | |
| parent | 0c0405dd113d2184996666f43be37abb373606e8 (diff) | |
| download | chromium_src-f749fe6715f1f3c81bda3576fd60f260ac47282a.zip chromium_src-f749fe6715f1f3c81bda3576fd60f260ac47282a.tar.gz chromium_src-f749fe6715f1f3c81bda3576fd60f260ac47282a.tar.bz2 | |
Revert of content gpu refactor: get rid of gpu related content switches. (patchset #8 id:100002 of https://codereview.chromium.org/1784193003/ )
Reason for revert:
Closed the tree: https://build.chromium.org/p/chromium/builders/Win/builds/41257/steps/compile/logs/stdio
Original issue's description:
> content gpu refactor: get rid of gpu related content switches.
>
> BUG=590825
> CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel
> CQ_EXTRA_TRYBOTS=tryserver.chromium.perf:winx64_10_perf_cq;tryserver.chromium.perf:mac_retina_perf_cq;tryserver.chromium.perf:linux_perf_cq
>
> Committed: https://crrev.com/9288ad04012900a9656959f441f4519f4239dccb
> Cr-Commit-Position: refs/heads/master@{#380906}
TBR=dcheng@chromium.org,mcasas@chromium.org,piman@chromium.org,penghuang@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=590825
Review URL: https://codereview.chromium.org/1796633002
Cr-Commit-Position: refs/heads/master@{#380908}
Diffstat (limited to 'content/gpu')
| -rw-r--r-- | content/gpu/gpu_child_thread.cc | 16 | ||||
| -rw-r--r-- | content/gpu/gpu_main.cc | 10 |
2 files changed, 15 insertions, 11 deletions
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc index 4a91da8..7422c464 100644 --- a/content/gpu/gpu_child_thread.cc +++ b/content/gpu/gpu_child_thread.cc @@ -17,9 +17,7 @@ #include "content/common/gpu/establish_channel_params.h" #include "content/common/gpu/gpu_host_messages.h" #include "content/common/gpu/gpu_memory_buffer_factory.h" -#include "content/common/gpu/media/gpu_jpeg_decode_accelerator.h" #include "content/common/gpu/media/gpu_video_decode_accelerator.h" -#include "content/common/gpu/media/gpu_video_encode_accelerator.h" #include "content/common/gpu/media/media_service.h" #include "content/gpu/gpu_process_control_impl.h" #include "content/gpu/gpu_watchdog_thread.h" @@ -192,6 +190,11 @@ GpuChildThread::GpuChildThread( base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kInProcessGPU)); + // Populate accelerator capabilities (normally done during GpuMain, which is + // not called for single process or in process gpu). + gpu_info_.video_decode_accelerator_capabilities = + content::GpuVideoDecodeAccelerator::GetCapabilities(); + #if defined(ENABLE_VULKAN) // Temporary Vulkan initialization injection. gpu::VulkanSurface::InitializeOneOff(); @@ -351,15 +354,6 @@ void GpuChildThread::StoreShaderToDisk(int32_t client_id, void GpuChildThread::OnInitialize(const gpu::GpuPreferences& gpu_preferences) { gpu_preferences_ = gpu_preferences; - - gpu_info_.video_decode_accelerator_capabilities = - content::GpuVideoDecodeAccelerator::GetCapabilities(gpu_preferences_); - gpu_info_.video_encode_accelerator_supported_profiles = - content::GpuVideoEncodeAccelerator::GetSupportedProfiles( - gpu_preferences_); - gpu_info_.jpeg_decode_accelerator_supported = - content::GpuJpegDecodeAccelerator::IsSupported(); - // Record initialization only after collecting the GPU info because that can // take a significant amount of time. gpu_info_.initialization_time = base::Time::Now() - process_start_time_; diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc index 10cc4af..4491ac8 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc @@ -23,6 +23,9 @@ #include "content/common/gpu/gpu_config.h" #include "content/common/gpu/gpu_host_messages.h" #include "content/common/gpu/gpu_memory_buffer_factory.h" +#include "content/common/gpu/media/gpu_jpeg_decode_accelerator.h" +#include "content/common/gpu/media/gpu_video_decode_accelerator.h" +#include "content/common/gpu/media/gpu_video_encode_accelerator.h" #include "content/common/sandbox_linux/sandbox_linux.h" #include "content/gpu/gpu_child_thread.h" #include "content/gpu/gpu_process.h" @@ -381,6 +384,13 @@ int GpuMain(const MainFunctionParams& parameters) { #elif defined(OS_MACOSX) gpu_info.sandboxed = Sandbox::SandboxIsCurrentlyActive(); #endif + + gpu_info.video_decode_accelerator_capabilities = + content::GpuVideoDecodeAccelerator::GetCapabilities(); + gpu_info.video_encode_accelerator_supported_profiles = + content::GpuVideoEncodeAccelerator::GetSupportedProfiles(); + gpu_info.jpeg_decode_accelerator_supported = + content::GpuJpegDecodeAccelerator::IsSupported(); } else { dead_on_arrival = true; } |
