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

Side by Side Diff: content/common/gpu/gpu_channel_test_common.h

Issue 1871613002: Compute GpuDriverBugWorkarounds only one time in the GPU process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "content/common/gpu/gpu_channel.h" 8 #include "content/common/gpu/gpu_channel.h"
9 #include "content/common/gpu/gpu_channel_manager.h" 9 #include "content/common/gpu/gpu_channel_manager.h"
10 #include "content/common/gpu/gpu_channel_manager_delegate.h" 10 #include "content/common/gpu/gpu_channel_manager_delegate.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void SendAcceleratedSurfaceCreatedChildWindow( 59 void SendAcceleratedSurfaceCreatedChildWindow(
60 gpu::SurfaceHandle parent_window, 60 gpu::SurfaceHandle parent_window,
61 gpu::SurfaceHandle child_window) override; 61 gpu::SurfaceHandle child_window) override;
62 #endif 62 #endif
63 63
64 DISALLOW_COPY_AND_ASSIGN(TestGpuChannelManagerDelegate); 64 DISALLOW_COPY_AND_ASSIGN(TestGpuChannelManagerDelegate);
65 }; 65 };
66 66
67 class TestGpuChannelManager : public GpuChannelManager { 67 class TestGpuChannelManager : public GpuChannelManager {
68 public: 68 public:
69 TestGpuChannelManager(const gpu::GpuPreferences& gpu_preferences, 69 TestGpuChannelManager(
70 GpuChannelManagerDelegate* delegate, 70 const gpu::GpuPreferences& gpu_preferences,
71 base::SingleThreadTaskRunner* task_runner, 71 const gpu::GpuDriverBugWorkarounds& gpu_driver_bug_workarounds,
72 base::SingleThreadTaskRunner* io_task_runner, 72 GpuChannelManagerDelegate* delegate,
73 gpu::SyncPointManager* sync_point_manager, 73 base::SingleThreadTaskRunner* task_runner,
74 GpuMemoryBufferFactory* gpu_memory_buffer_factory); 74 base::SingleThreadTaskRunner* io_task_runner,
75 gpu::SyncPointManager* sync_point_manager,
76 GpuMemoryBufferFactory* gpu_memory_buffer_factory);
75 ~TestGpuChannelManager() override; 77 ~TestGpuChannelManager() override;
76 78
77 protected: 79 protected:
78 scoped_ptr<GpuChannel> CreateGpuChannel( 80 scoped_ptr<GpuChannel> CreateGpuChannel(
79 int client_id, 81 int client_id,
80 uint64_t client_tracing_id, 82 uint64_t client_tracing_id,
81 bool preempts, 83 bool preempts,
82 bool allow_view_command_buffers, 84 bool allow_view_command_buffers,
83 bool allow_real_time_streams) override; 85 bool allow_real_time_streams) override;
84 }; 86 };
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 120
119 protected: 121 protected:
120 GpuChannelManager* channel_manager() { return channel_manager_.get(); } 122 GpuChannelManager* channel_manager() { return channel_manager_.get(); }
121 TestGpuChannelManagerDelegate* channel_manager_delegate() { 123 TestGpuChannelManagerDelegate* channel_manager_delegate() {
122 return channel_manager_delegate_.get(); 124 return channel_manager_delegate_.get();
123 } 125 }
124 base::TestSimpleTaskRunner* task_runner() { return task_runner_.get(); } 126 base::TestSimpleTaskRunner* task_runner() { return task_runner_.get(); }
125 127
126 private: 128 private:
127 gpu::GpuPreferences gpu_preferences_; 129 gpu::GpuPreferences gpu_preferences_;
130 gpu::GpuDriverBugWorkarounds gpu_driver_bug_workarounds_;
128 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; 131 scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
129 scoped_refptr<base::TestSimpleTaskRunner> io_task_runner_; 132 scoped_refptr<base::TestSimpleTaskRunner> io_task_runner_;
130 scoped_ptr<gpu::SyncPointManager> sync_point_manager_; 133 scoped_ptr<gpu::SyncPointManager> sync_point_manager_;
131 scoped_ptr<TestGpuChannelManagerDelegate> channel_manager_delegate_; 134 scoped_ptr<TestGpuChannelManagerDelegate> channel_manager_delegate_;
132 scoped_ptr<GpuChannelManager> channel_manager_; 135 scoped_ptr<GpuChannelManager> channel_manager_;
133 }; 136 };
134 137
135 } // namespace content 138 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698