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

Side by Side Diff: gpu/command_buffer/service/in_process_command_buffer.h

Issue 1168993002: Update the native_viewport interface to allow specification of the surface configuration, currently… (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Final cleanups Created 5 years, 6 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // a new GLSurface. 77 // a new GLSurface.
78 bool Initialize(scoped_refptr<gfx::GLSurface> surface, 78 bool Initialize(scoped_refptr<gfx::GLSurface> surface,
79 bool is_offscreen, 79 bool is_offscreen,
80 gfx::AcceleratedWidget window, 80 gfx::AcceleratedWidget window,
81 const gfx::Size& size, 81 const gfx::Size& size,
82 const std::vector<int32>& attribs, 82 const std::vector<int32>& attribs,
83 gfx::GpuPreference gpu_preference, 83 gfx::GpuPreference gpu_preference,
84 const base::Closure& context_lost_callback, 84 const base::Closure& context_lost_callback,
85 InProcessCommandBuffer* share_group, 85 InProcessCommandBuffer* share_group,
86 GpuMemoryBufferManager* gpu_memory_buffer_manager, 86 GpuMemoryBufferManager* gpu_memory_buffer_manager,
87 ImageFactory* image_factory); 87 ImageFactory* image_factory,
88 const gfx::SurfaceConfiguration& requested_configuration);
88 void Destroy(); 89 void Destroy();
89 90
90 // CommandBuffer implementation: 91 // CommandBuffer implementation:
91 bool Initialize() override; 92 bool Initialize() override;
92 State GetLastState() override; 93 State GetLastState() override;
93 int32 GetLastToken() override; 94 int32 GetLastToken() override;
94 void Flush(int32 put_offset) override; 95 void Flush(int32 put_offset) override;
95 void OrderingBarrier(int32 put_offset) override; 96 void OrderingBarrier(int32 put_offset) override;
96 void WaitForTokenInRange(int32 start, int32 end) override; 97 void WaitForTokenInRange(int32 start, int32 end) override;
97 void WaitForGetOffsetInRange(int32 start, int32 end) override; 98 void WaitForGetOffsetInRange(int32 start, int32 end) override;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 private: 162 private:
162 struct InitializeOnGpuThreadParams { 163 struct InitializeOnGpuThreadParams {
163 bool is_offscreen; 164 bool is_offscreen;
164 gfx::AcceleratedWidget window; 165 gfx::AcceleratedWidget window;
165 const gfx::Size& size; 166 const gfx::Size& size;
166 const std::vector<int32>& attribs; 167 const std::vector<int32>& attribs;
167 gfx::GpuPreference gpu_preference; 168 gfx::GpuPreference gpu_preference;
168 gpu::Capabilities* capabilities; // Ouptut. 169 gpu::Capabilities* capabilities; // Ouptut.
169 InProcessCommandBuffer* context_group; 170 InProcessCommandBuffer* context_group;
170 ImageFactory* image_factory; 171 ImageFactory* image_factory;
172 gfx::SurfaceConfiguration requested_configuration;
171 173
172 InitializeOnGpuThreadParams(bool is_offscreen, 174 InitializeOnGpuThreadParams(
173 gfx::AcceleratedWidget window, 175 bool is_offscreen,
174 const gfx::Size& size, 176 gfx::AcceleratedWidget window,
175 const std::vector<int32>& attribs, 177 const gfx::Size& size,
176 gfx::GpuPreference gpu_preference, 178 const std::vector<int32>& attribs,
177 gpu::Capabilities* capabilities, 179 gfx::GpuPreference gpu_preference,
178 InProcessCommandBuffer* share_group, 180 gpu::Capabilities* capabilities,
179 ImageFactory* image_factory) 181 InProcessCommandBuffer* share_group,
180 : is_offscreen(is_offscreen), 182 ImageFactory* image_factory,
181 window(window), 183 const gfx::SurfaceConfiguration& requested_configuration);
182 size(size),
183 attribs(attribs),
184 gpu_preference(gpu_preference),
185 capabilities(capabilities),
186 context_group(share_group),
187 image_factory(image_factory) {}
188 }; 184 };
189 185
190 bool InitializeOnGpuThread(const InitializeOnGpuThreadParams& params); 186 bool InitializeOnGpuThread(const InitializeOnGpuThreadParams& params);
191 bool DestroyOnGpuThread(); 187 bool DestroyOnGpuThread();
192 void FlushOnGpuThread(int32 put_offset); 188 void FlushOnGpuThread(int32 put_offset);
193 void ScheduleIdleWorkOnGpuThread(); 189 void ScheduleIdleWorkOnGpuThread();
194 uint32 CreateStreamTextureOnGpuThread(uint32 client_texture_id); 190 uint32 CreateStreamTextureOnGpuThread(uint32 client_texture_id);
195 bool MakeCurrent(); 191 bool MakeCurrent();
196 base::Closure WrapCallback(const base::Closure& callback); 192 base::Closure WrapCallback(const base::Closure& callback);
197 State GetStateFast(); 193 State GetStateFast();
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 251
256 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; 252 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_;
257 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; 253 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_;
258 254
259 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); 255 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer);
260 }; 256 };
261 257
262 } // namespace gpu 258 } // namespace gpu
263 259
264 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ 260 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698