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

Side by Side Diff: content/gpu/in_process_gpu_thread.cc

Issue 1831513003: Pull gpu service/client shared memory buffer code to GpuMemoryBufferSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed ifdef mixup 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/gpu/in_process_gpu_thread.h" 5 #include "content/gpu/in_process_gpu_thread.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "content/common/gpu/gpu_memory_buffer_factory.h" 9 #include "content/common/gpu/gpu_memory_buffer_factory.h"
10 #include "content/gpu/gpu_child_thread.h" 10 #include "content/gpu/gpu_child_thread.h"
11 #include "content/gpu/gpu_process.h" 11 #include "content/gpu/gpu_process.h"
12 #include "gpu/command_buffer/service/sync_point_manager.h" 12 #include "gpu/command_buffer/service/sync_point_manager.h"
13 #include "gpu/ipc/common/gpu_memory_buffer_support.h"
13 14
14 #if defined(OS_ANDROID) 15 #if defined(OS_ANDROID)
15 #include "base/android/jni_android.h" 16 #include "base/android/jni_android.h"
16 #endif 17 #endif
17 18
18 namespace content { 19 namespace content {
19 20
20 InProcessGpuThread::InProcessGpuThread( 21 InProcessGpuThread::InProcessGpuThread(
21 const InProcessChildThreadParams& params, 22 const InProcessChildThreadParams& params,
22 const gpu::GpuPreferences& gpu_preferences, 23 const gpu::GpuPreferences& gpu_preferences,
23 gpu::SyncPointManager* sync_point_manager_override) 24 gpu::SyncPointManager* sync_point_manager_override)
24 : base::Thread("Chrome_InProcGpuThread"), 25 : base::Thread("Chrome_InProcGpuThread"),
25 params_(params), 26 params_(params),
26 gpu_process_(NULL), 27 gpu_process_(NULL),
27 gpu_preferences_(gpu_preferences), 28 gpu_preferences_(gpu_preferences),
28 sync_point_manager_override_(sync_point_manager_override), 29 sync_point_manager_override_(sync_point_manager_override),
29 gpu_memory_buffer_factory_( 30 gpu_memory_buffer_factory_(
30 GpuMemoryBufferFactory::GetNativeType() != gfx::EMPTY_BUFFER 31 gpu::GetNativeGpuMemoryBufferType() != gfx::EMPTY_BUFFER
31 ? GpuMemoryBufferFactory::CreateNativeType() 32 ? GpuMemoryBufferFactory::CreateNativeType()
32 : nullptr) { 33 : nullptr) {
33 if (!sync_point_manager_override_) { 34 if (!sync_point_manager_override_) {
34 sync_point_manager_.reset(new gpu::SyncPointManager(false)); 35 sync_point_manager_.reset(new gpu::SyncPointManager(false));
35 sync_point_manager_override_ = sync_point_manager_.get(); 36 sync_point_manager_override_ = sync_point_manager_.get();
36 } 37 }
37 } 38 }
38 39
39 InProcessGpuThread::~InProcessGpuThread() { 40 InProcessGpuThread::~InProcessGpuThread() {
40 Stop(); 41 Stop();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 75 }
75 76
76 base::Thread* CreateInProcessGpuThread( 77 base::Thread* CreateInProcessGpuThread(
77 const InProcessChildThreadParams& params, 78 const InProcessChildThreadParams& params,
78 const gpu::GpuPreferences& gpu_preferences) { 79 const gpu::GpuPreferences& gpu_preferences) {
79 return new InProcessGpuThread( 80 return new InProcessGpuThread(
80 params, gpu_preferences, nullptr); 81 params, gpu_preferences, nullptr);
81 } 82 }
82 83
83 } // namespace content 84 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698