Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(768)

Unified Diff: content/gpu/gpu_child_thread.cc

Issue 1784193003: content gpu refactor: get rid of gpu related content switches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the compile problem on windows Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/media/vt_video_decode_accelerator_mac.cc ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_child_thread.cc
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
index 7422c464cb7e51bdad34fd8fe3414348ffc392a5..4a91da8f6c69838e2aa66ab7ab8418b37d13b836 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -17,7 +17,9 @@
#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"
@@ -190,11 +192,6 @@ 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();
@@ -354,6 +351,15 @@ 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_;
« no previous file with comments | « content/common/gpu/media/vt_video_decode_accelerator_mac.cc ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698