diff options
author | kcarattini <kcarattini@chromium.org> | 2015-06-28 22:45:52 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-29 05:46:16 +0000 |
commit | 1cf221f6cebc8850220100c24d00a18ad54bfe8d (patch) | |
tree | 2a6c6bbef71b25f804e196f178ba4b5aed76f2e2 /content/gpu | |
parent | 09d7e98343a5a7da981b3cac24d726dbcae79988 (diff) | |
download | chromium_src-1cf221f6cebc8850220100c24d00a18ad54bfe8d.zip chromium_src-1cf221f6cebc8850220100c24d00a18ad54bfe8d.tar.gz chromium_src-1cf221f6cebc8850220100c24d00a18ad54bfe8d.tar.bz2 |
Revert of content: Fix single process support for native GpuMemoryBuffers. (patchset #1 id:1 of https://codereview.chromium.org/1221473003/)
Reason for revert:
XP_tests started failing with "missing shard" exceptions. Suspect this cl.
https://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29/builds/38438
Original issue's description:
> content: Fix single process support for native GpuMemoryBuffers.
>
> Also add the startup message filter for CreateGpuMemoryBuffer
> messages in single process mode.
>
> BUG=497559,504121
>
> Committed: https://crrev.com/29ec87df6cef29b9f28dd21d385f16ce99df9ce3
> Cr-Commit-Position: refs/heads/master@{#336495}
TBR=piman@chromium.org,reveman@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=497559,504121
Review URL: https://codereview.chromium.org/1210073003
Cr-Commit-Position: refs/heads/master@{#336531}
Diffstat (limited to 'content/gpu')
-rw-r--r-- | content/gpu/gpu_child_thread.cc | 17 | ||||
-rw-r--r-- | content/gpu/gpu_child_thread.h | 5 | ||||
-rw-r--r-- | content/gpu/gpu_main.cc | 7 | ||||
-rw-r--r-- | content/gpu/in_process_gpu_thread.cc | 8 | ||||
-rw-r--r-- | content/gpu/in_process_gpu_thread.h | 4 |
5 files changed, 11 insertions, 30 deletions
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc index 7d7ffe8..3a4216b 100644 --- a/content/gpu/gpu_child_thread.cc +++ b/content/gpu/gpu_child_thread.cc @@ -130,17 +130,13 @@ GpuChildThread::GpuChildThread( g_thread_safe_sender.Get() = thread_safe_sender(); } -GpuChildThread::GpuChildThread( - const InProcessChildThreadParams& params, - GpuMemoryBufferFactory* gpu_memory_buffer_factory) +GpuChildThread::GpuChildThread(const InProcessChildThreadParams& params) : ChildThreadImpl(ChildThreadImpl::Options::Builder() .InBrowserProcess(params) - .AddStartupFilter(new GpuMemoryBufferMessageFilter( - gpu_memory_buffer_factory)) .Build()), dead_on_arrival_(false), in_browser_process_(true), - gpu_memory_buffer_factory_(gpu_memory_buffer_factory) { + gpu_memory_buffer_factory_(nullptr) { #if defined(OS_WIN) target_services_ = NULL; #endif @@ -158,15 +154,6 @@ GpuChildThread::GpuChildThread( GpuChildThread::~GpuChildThread() { } -// static -gfx::GpuMemoryBufferType GpuChildThread::GetGpuMemoryBufferFactoryType() { - std::vector<gfx::GpuMemoryBufferType> supported_types; - GpuMemoryBufferFactory::GetSupportedTypes(&supported_types); - DCHECK(!supported_types.empty()); - // Note: We always use the preferred type. - return supported_types[0]; -} - void GpuChildThread::Shutdown() { ChildThreadImpl::Shutdown(); logging::SetLogMessageHandler(NULL); diff --git a/content/gpu/gpu_child_thread.h b/content/gpu/gpu_child_thread.h index a9ed8b9..3993e51 100644 --- a/content/gpu/gpu_child_thread.h +++ b/content/gpu/gpu_child_thread.h @@ -44,13 +44,10 @@ class GpuChildThread : public ChildThreadImpl { const DeferredMessages& deferred_messages, GpuMemoryBufferFactory* gpu_memory_buffer_factory); - GpuChildThread(const InProcessChildThreadParams& params, - GpuMemoryBufferFactory* gpu_memory_buffer_factory); + explicit GpuChildThread(const InProcessChildThreadParams& params); ~GpuChildThread() override; - static gfx::GpuMemoryBufferType GetGpuMemoryBufferFactoryType(); - void Shutdown() override; void Init(const base::Time& process_start_time); diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc index 1a543ca..f520aeb 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc @@ -365,9 +365,12 @@ int GpuMain(const MainFunctionParams& parameters) { logging::SetLogMessageHandler(NULL); + std::vector<gfx::GpuMemoryBufferType> supported_types; + GpuMemoryBufferFactory::GetSupportedTypes(&supported_types); + DCHECK(!supported_types.empty()); + // Note: We always use the preferred type. scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory = - GpuMemoryBufferFactory::Create( - GpuChildThread::GetGpuMemoryBufferFactoryType()); + GpuMemoryBufferFactory::Create(supported_types[0]); GpuProcess gpu_process; diff --git a/content/gpu/in_process_gpu_thread.cc b/content/gpu/in_process_gpu_thread.cc index d8329f2..dfd9d35 100644 --- a/content/gpu/in_process_gpu_thread.cc +++ b/content/gpu/in_process_gpu_thread.cc @@ -4,7 +4,6 @@ #include "content/gpu/in_process_gpu_thread.h" -#include "content/common/gpu/gpu_memory_buffer_factory.h" #include "content/gpu/gpu_child_thread.h" #include "content/gpu/gpu_process.h" @@ -13,9 +12,7 @@ namespace content { InProcessGpuThread::InProcessGpuThread(const InProcessChildThreadParams& params) : base::Thread("Chrome_InProcGpuThread"), params_(params), - gpu_process_(NULL), - gpu_memory_buffer_factory_(GpuMemoryBufferFactory::Create( - GpuChildThread::GetGpuMemoryBufferFactoryType())) { + gpu_process_(NULL) { } InProcessGpuThread::~InProcessGpuThread() { @@ -26,8 +23,7 @@ void InProcessGpuThread::Init() { gpu_process_ = new GpuProcess(); // The process object takes ownership of the thread object, so do not // save and delete the pointer. - gpu_process_->set_main_thread( - new GpuChildThread(params_, gpu_memory_buffer_factory_.get())); + gpu_process_->set_main_thread(new GpuChildThread(params_)); } void InProcessGpuThread::CleanUp() { diff --git a/content/gpu/in_process_gpu_thread.h b/content/gpu/in_process_gpu_thread.h index 3716730..67ba017 100644 --- a/content/gpu/in_process_gpu_thread.h +++ b/content/gpu/in_process_gpu_thread.h @@ -7,11 +7,11 @@ #include "base/threading/thread.h" #include "content/common/content_export.h" +#include "content/common/content_export.h" #include "content/common/in_process_child_thread_params.h" namespace content { -class GpuMemoryBufferFactory; class GpuProcess; // This class creates a GPU thread (instead of a GPU process), when running @@ -31,8 +31,6 @@ class InProcessGpuThread : public base::Thread { // Deleted in CleanUp() on the gpu thread, so don't use smart pointers. GpuProcess* gpu_process_; - scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory_; - DISALLOW_COPY_AND_ASSIGN(InProcessGpuThread); }; |