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

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

Issue 1084173004: Adding status to swap complete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ozone demo 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "content/common/gpu/gpu_memory_manager.h" 16 #include "content/common/gpu/gpu_memory_manager.h"
17 #include "content/common/gpu/gpu_memory_manager_client.h" 17 #include "content/common/gpu/gpu_memory_manager_client.h"
18 #include "gpu/command_buffer/common/constants.h" 18 #include "gpu/command_buffer/common/constants.h"
19 #include "gpu/command_buffer/common/gpu_memory_allocation.h" 19 #include "gpu/command_buffer/common/gpu_memory_allocation.h"
20 #include "gpu/command_buffer/service/command_buffer_service.h" 20 #include "gpu/command_buffer/service/command_buffer_service.h"
21 #include "gpu/command_buffer/service/context_group.h" 21 #include "gpu/command_buffer/service/context_group.h"
22 #include "gpu/command_buffer/service/gpu_scheduler.h" 22 #include "gpu/command_buffer/service/gpu_scheduler.h"
23 #include "ipc/ipc_listener.h" 23 #include "ipc/ipc_listener.h"
24 #include "ipc/ipc_sender.h" 24 #include "ipc/ipc_sender.h"
25 #include "media/base/video_decoder_config.h" 25 #include "media/base/video_decoder_config.h"
26 #include "ui/events/latency_info.h" 26 #include "ui/events/latency_info.h"
27 #include "ui/gfx/geometry/size.h" 27 #include "ui/gfx/geometry/size.h"
28 #include "ui/gfx/gpu_memory_buffer.h" 28 #include "ui/gfx/gpu_memory_buffer.h"
29 #include "ui/gfx/native_widget_types.h" 29 #include "ui/gfx/native_widget_types.h"
30 #include "ui/gfx/swap_result.h"
30 #include "ui/gl/gl_surface.h" 31 #include "ui/gl/gl_surface.h"
31 #include "ui/gl/gpu_preference.h" 32 #include "ui/gl/gpu_preference.h"
32 #include "url/gurl.h" 33 #include "url/gurl.h"
33 34
34 namespace gpu { 35 namespace gpu {
35 struct Mailbox; 36 struct Mailbox;
36 class ValueStateMap; 37 class ValueStateMap;
37 namespace gles2 { 38 namespace gles2 {
38 class MailboxManager; 39 class MailboxManager;
39 class SubscriptionRefSet; 40 class SubscriptionRefSet;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 142
142 void SetPreemptByFlag(scoped_refptr<gpu::PreemptionFlag> flag); 143 void SetPreemptByFlag(scoped_refptr<gpu::PreemptionFlag> flag);
143 144
144 void SetLatencyInfoCallback(const LatencyInfoCallback& callback); 145 void SetLatencyInfoCallback(const LatencyInfoCallback& callback);
145 146
146 void MarkContextLost(); 147 void MarkContextLost();
147 148
148 uint64 GetMemoryUsage() const; 149 uint64 GetMemoryUsage() const;
149 150
150 void SendSwapBuffersCompleted( 151 void SendSwapBuffersCompleted(
151 const std::vector<ui::LatencyInfo>& latency_info); 152 const std::vector<ui::LatencyInfo>& latency_info,
153 gfx::SwapResult result);
152 void SendUpdateVSyncParameters(base::TimeTicks timebase, 154 void SendUpdateVSyncParameters(base::TimeTicks timebase,
153 base::TimeDelta interval); 155 base::TimeDelta interval);
154 156
155 private: 157 private:
156 GpuMemoryManager* GetMemoryManager() const; 158 GpuMemoryManager* GetMemoryManager() const;
157 bool MakeCurrent(); 159 bool MakeCurrent();
158 void Destroy(); 160 void Destroy();
159 161
160 // Cleans up and sends reply if OnInitialize failed. 162 // Cleans up and sends reply if OnInitialize failed.
161 void OnInitializeFailed(IPC::Message* reply_message); 163 void OnInitializeFailed(IPC::Message* reply_message);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 size_t total_gpu_memory_; 286 size_t total_gpu_memory_;
285 scoped_ptr<WaitForCommandState> wait_for_token_; 287 scoped_ptr<WaitForCommandState> wait_for_token_;
286 scoped_ptr<WaitForCommandState> wait_for_get_offset_; 288 scoped_ptr<WaitForCommandState> wait_for_get_offset_;
287 289
288 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); 290 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub);
289 }; 291 };
290 292
291 } // namespace content 293 } // namespace content
292 294
293 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ 295 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
OLDNEW
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy_impl.cc ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698