| OLD | NEW |
| 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> |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 void SendCachedShader(const std::string& key, const std::string& shader); | 136 void SendCachedShader(const std::string& key, const std::string& shader); |
| 137 | 137 |
| 138 gfx::GLSurface* surface() const { return surface_.get(); } | 138 gfx::GLSurface* surface() const { return surface_.get(); } |
| 139 | 139 |
| 140 void AddDestructionObserver(DestructionObserver* observer); | 140 void AddDestructionObserver(DestructionObserver* observer); |
| 141 void RemoveDestructionObserver(DestructionObserver* observer); | 141 void RemoveDestructionObserver(DestructionObserver* observer); |
| 142 | 142 |
| 143 // Associates a sync point to this stub. When the stub is destroyed, it will | 143 // Associates a sync point to this stub. When the stub is destroyed, it will |
| 144 // retire all sync points that haven't been previously retired. | 144 // retire all sync points that haven't been previously retired. |
| 145 void AddSyncPoint(uint32 sync_point); | 145 void AddSyncPoint(uint32 sync_point, bool retire); |
| 146 | 146 |
| 147 void SetPreemptByFlag(scoped_refptr<gpu::PreemptionFlag> flag); | 147 void SetPreemptByFlag(scoped_refptr<gpu::PreemptionFlag> flag); |
| 148 | 148 |
| 149 void SetLatencyInfoCallback(const LatencyInfoCallback& callback); | 149 void SetLatencyInfoCallback(const LatencyInfoCallback& callback); |
| 150 | 150 |
| 151 void MarkContextLost(); | 151 void MarkContextLost(); |
| 152 | 152 |
| 153 const gpu::gles2::FeatureInfo* GetFeatureInfo() const; | 153 const gpu::gles2::FeatureInfo* GetFeatureInfo() const; |
| 154 | 154 |
| 155 void SendSwapBuffersCompleted( | 155 void SendSwapBuffersCompleted( |
| (...skipping 19 matching lines...) Expand all Loading... |
| 175 void OnProduceFrontBuffer(const gpu::Mailbox& mailbox); | 175 void OnProduceFrontBuffer(const gpu::Mailbox& mailbox); |
| 176 void OnGetState(IPC::Message* reply_message); | 176 void OnGetState(IPC::Message* reply_message); |
| 177 void OnWaitForTokenInRange(int32 start, | 177 void OnWaitForTokenInRange(int32 start, |
| 178 int32 end, | 178 int32 end, |
| 179 IPC::Message* reply_message); | 179 IPC::Message* reply_message); |
| 180 void OnWaitForGetOffsetInRange(int32 start, | 180 void OnWaitForGetOffsetInRange(int32 start, |
| 181 int32 end, | 181 int32 end, |
| 182 IPC::Message* reply_message); | 182 IPC::Message* reply_message); |
| 183 void OnAsyncFlush(int32 put_offset, uint32 flush_count, | 183 void OnAsyncFlush(int32 put_offset, uint32 flush_count, |
| 184 const std::vector<ui::LatencyInfo>& latency_info); | 184 const std::vector<ui::LatencyInfo>& latency_info); |
| 185 void OnRescheduled(); | |
| 186 void OnRegisterTransferBuffer(int32 id, | 185 void OnRegisterTransferBuffer(int32 id, |
| 187 base::SharedMemoryHandle transfer_buffer, | 186 base::SharedMemoryHandle transfer_buffer, |
| 188 uint32 size); | 187 uint32 size); |
| 189 void OnDestroyTransferBuffer(int32 id); | 188 void OnDestroyTransferBuffer(int32 id); |
| 190 void OnGetTransferBuffer(int32 id, IPC::Message* reply_message); | 189 void OnGetTransferBuffer(int32 id, IPC::Message* reply_message); |
| 191 | 190 |
| 192 void OnCreateVideoDecoder(media::VideoCodecProfile profile, | 191 void OnCreateVideoDecoder(media::VideoCodecProfile profile, |
| 193 int32 route_id, | 192 int32 route_id, |
| 194 IPC::Message* reply_message); | 193 IPC::Message* reply_message); |
| 195 void OnCreateVideoEncoder(media::VideoPixelFormat input_format, | 194 void OnCreateVideoEncoder(media::VideoPixelFormat input_format, |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 size_t total_gpu_memory_; | 297 size_t total_gpu_memory_; |
| 299 scoped_ptr<WaitForCommandState> wait_for_token_; | 298 scoped_ptr<WaitForCommandState> wait_for_token_; |
| 300 scoped_ptr<WaitForCommandState> wait_for_get_offset_; | 299 scoped_ptr<WaitForCommandState> wait_for_get_offset_; |
| 301 | 300 |
| 302 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 301 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
| 303 }; | 302 }; |
| 304 | 303 |
| 305 } // namespace content | 304 } // namespace content |
| 306 | 305 |
| 307 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 306 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| OLD | NEW |