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

Side by Side Diff: chrome/renderer/command_buffer_proxy.h

Issue 1136006: Calling OpenGL from the renderer process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | « chrome/plugin/command_buffer_stub.cc ('k') | chrome/renderer/command_buffer_proxy.cc » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_ 5 #ifndef CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_
6 #define CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_ 6 #define CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_
7 7
8 #if defined(ENABLE_GPU) 8 #if defined(ENABLE_GPU)
9 9
10 #include <map> 10 #include <map>
11 #include <queue> 11 #include <queue>
12 12
13 #include "base/linked_ptr.h" 13 #include "base/linked_ptr.h"
14 #include "base/ref_counted.h" 14 #include "base/ref_counted.h"
15 #include "base/scoped_ptr.h" 15 #include "base/scoped_ptr.h"
16 #include "base/shared_memory.h" 16 #include "base/shared_memory.h"
17 #include "base/task.h" 17 #include "base/task.h"
18 #include "gfx/size.h"
18 #include "gpu/command_buffer/common/command_buffer.h" 19 #include "gpu/command_buffer/common/command_buffer.h"
19 #include "ipc/ipc_channel.h" 20 #include "ipc/ipc_channel.h"
20 #include "ipc/ipc_message.h" 21 #include "ipc/ipc_message.h"
21 22
22 class PluginChannelHost; 23 class PluginChannelHost;
23 24
24 // Client side proxy that forwards messages synchronously to a 25 // Client side proxy that forwards messages synchronously to a
25 // CommandBufferStub. 26 // CommandBufferStub.
26 class CommandBufferProxy : public gpu::CommandBuffer, 27 class CommandBufferProxy : public gpu::CommandBuffer,
27 public IPC::Channel::Listener, 28 public IPC::Channel::Listener,
(...skipping 16 matching lines...) Expand all
44 virtual gpu::Buffer GetRingBuffer(); 45 virtual gpu::Buffer GetRingBuffer();
45 virtual State GetState(); 46 virtual State GetState();
46 virtual State Flush(int32 put_offset); 47 virtual State Flush(int32 put_offset);
47 virtual void SetGetOffset(int32 get_offset); 48 virtual void SetGetOffset(int32 get_offset);
48 virtual int32 CreateTransferBuffer(size_t size); 49 virtual int32 CreateTransferBuffer(size_t size);
49 virtual void DestroyTransferBuffer(int32 id); 50 virtual void DestroyTransferBuffer(int32 id);
50 virtual gpu::Buffer GetTransferBuffer(int32 handle); 51 virtual gpu::Buffer GetTransferBuffer(int32 handle);
51 virtual void SetToken(int32 token); 52 virtual void SetToken(int32 token);
52 virtual void SetParseError(gpu::error::Error error); 53 virtual void SetParseError(gpu::error::Error error);
53 54
55 // Asynchronously resizes an offscreen frame buffer.
56 void ResizeOffscreenFrameBuffer(const gfx::Size& size);
57
54 // Set a task that will be invoked the next time the window becomes invalid 58 // Set a task that will be invoked the next time the window becomes invalid
55 // and needs to be repainted. Takes ownership of task. 59 // and needs to be repainted. Takes ownership of task.
56 void SetNotifyRepaintTask(Task* task) { 60 void SetNotifyRepaintTask(Task* task) {
57 notify_repaint_task_.reset(task); 61 notify_repaint_task_.reset(task);
58 } 62 }
59 63
60 #if defined(OS_MACOSX) 64 #if defined(OS_MACOSX)
61 virtual void SetWindowSize(int32 width, int32 height); 65 virtual void SetWindowSize(int32 width, int32 height);
62 #endif 66 #endif
63 67
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 AsyncFlushTaskQueue pending_async_flush_tasks_; 102 AsyncFlushTaskQueue pending_async_flush_tasks_;
99 103
100 scoped_ptr<Task> notify_repaint_task_; 104 scoped_ptr<Task> notify_repaint_task_;
101 105
102 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); 106 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy);
103 }; 107 };
104 108
105 #endif // ENABLE_GPU 109 #endif // ENABLE_GPU
106 110
107 #endif // CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_ 111 #endif // CHROME_RENDERER_COMMAND_BUFFER_PROXY_H_
OLDNEW
« no previous file with comments | « chrome/plugin/command_buffer_stub.cc ('k') | chrome/renderer/command_buffer_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698