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

Side by Side Diff: gpu/ipc/command_buffer_proxy.h

Issue 10510013: GPU: Adding sync points for cross-channel synchronization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 8 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 | Annotate | Revision Log
« no previous file with comments | « content/content_common.gypi ('k') | ppapi/proxy/ppapi_command_buffer_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 GPU_IPC_COMMAND_BUFFER_PROXY_H_ 5 #ifndef GPU_IPC_COMMAND_BUFFER_PROXY_H_
6 #define GPU_IPC_COMMAND_BUFFER_PROXY_H_ 6 #define GPU_IPC_COMMAND_BUFFER_PROXY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 19 matching lines...) Expand all
30 // Invoke the task when the channel has been flushed. Takes care of deleting 30 // Invoke the task when the channel has been flushed. Takes care of deleting
31 // the task whether the echo succeeds or not. 31 // the task whether the echo succeeds or not.
32 virtual bool Echo(const base::Closure& callback) = 0; 32 virtual bool Echo(const base::Closure& callback) = 0;
33 33
34 // Sends an IPC message with the new state of surface visibility. 34 // Sends an IPC message with the new state of surface visibility.
35 virtual bool SetSurfaceVisible(bool visible) = 0; 35 virtual bool SetSurfaceVisible(bool visible) = 0;
36 36
37 virtual bool DiscardBackbuffer() = 0; 37 virtual bool DiscardBackbuffer() = 0;
38 virtual bool EnsureBackbuffer() = 0; 38 virtual bool EnsureBackbuffer() = 0;
39 39
40 // Inserts a sync point, returning its ID. This is handled on the IO thread of
41 // the GPU process, and so should be relatively fast, but its effect is
42 // ordered wrt other messages (in particular, Flush). Sync point IDs are
43 // global and can be used for cross-channel synchronization.
44 virtual uint32 InsertSyncPoint() = 0;
45
46 // Makes this command buffer wait on a sync point. This command buffer will be
47 // unscheduled until the command buffer that inserted that sync point reaches
48 // it, or gets destroyed.
49 virtual void WaitSyncPoint(uint32) = 0;
50
40 // Register a callback to invoke whenever we recieve a new memory allocation. 51 // Register a callback to invoke whenever we recieve a new memory allocation.
41 virtual void SetMemoryAllocationChangedCallback( 52 virtual void SetMemoryAllocationChangedCallback(
42 const base::Callback<void(const GpuMemoryAllocationForRenderer&)>& 53 const base::Callback<void(const GpuMemoryAllocationForRenderer&)>&
43 callback) = 0; 54 callback) = 0;
44 55
45 // Reparent a command buffer. TODO(apatrick): going forward, the notion of 56 // Reparent a command buffer. TODO(apatrick): going forward, the notion of
46 // the parent / child relationship between command buffers is going away in 57 // the parent / child relationship between command buffers is going away in
47 // favor of the notion of surfaces that can be drawn to in one command buffer 58 // favor of the notion of surfaces that can be drawn to in one command buffer
48 // and bound as a texture in any other. 59 // and bound as a texture in any other.
49 virtual bool SetParent(CommandBufferProxy* parent_command_buffer, 60 virtual bool SetParent(CommandBufferProxy* parent_command_buffer,
50 uint32 parent_texture_id) = 0; 61 uint32 parent_texture_id) = 0;
51 62
52 virtual void SetChannelErrorCallback(const base::Closure& callback) = 0; 63 virtual void SetChannelErrorCallback(const base::Closure& callback) = 0;
53 64
54 // Set a task that will be invoked the next time the window becomes invalid 65 // Set a task that will be invoked the next time the window becomes invalid
55 // and needs to be repainted. Takes ownership of task. 66 // and needs to be repainted. Takes ownership of task.
56 virtual void SetNotifyRepaintTask(const base::Closure& callback) = 0; 67 virtual void SetNotifyRepaintTask(const base::Closure& callback) = 0;
57 68
58 virtual void SetOnConsoleMessageCallback( 69 virtual void SetOnConsoleMessageCallback(
59 const GpuConsoleMessageCallback& callback) = 0; 70 const GpuConsoleMessageCallback& callback) = 0;
60 71
61 private: 72 private:
62 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); 73 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy);
63 }; 74 };
64 75
65 #endif // GPU_IPC_COMMAND_BUFFER_PROXY_H_ 76 #endif // GPU_IPC_COMMAND_BUFFER_PROXY_H_
OLDNEW
« no previous file with comments | « content/content_common.gypi ('k') | ppapi/proxy/ppapi_command_buffer_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698