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

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

Issue 9904005: PpapiCommandBufferProxy implements CommandBufferProxy. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed Windows Build. Thanks girard@! Created 8 years, 8 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 | « gpu/gpu_ipc.gypi ('k') | gpu/ipc/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) 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_CLIENT_COMMAND_BUFFER_PROXY_H_ 5 #ifndef GPU_IPC_COMMAND_BUFFER_PROXY_H_
6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_H_ 6 #define GPU_IPC_COMMAND_BUFFER_PROXY_H_
7 #pragma once 7 #pragma once
8 8
9 #if defined(ENABLE_GPU)
10
11 #include <string> 9 #include <string>
12 10
13 #include "base/callback.h" 11 #include "base/callback.h"
14 #include "base/memory/linked_ptr.h"
15 #include "base/memory/scoped_ptr.h"
16 #include "content/common/gpu/client/gpu_video_decode_accelerator_host.h"
17 #include "gpu/command_buffer/common/command_buffer.h" 12 #include "gpu/command_buffer/common/command_buffer.h"
18 #include "gpu/command_buffer/common/command_buffer_shared.h" 13 #include "gpu/command_buffer/common/command_buffer_shared.h"
19 14
20 struct GpuMemoryAllocationForRenderer; 15 struct GpuMemoryAllocationForRenderer;
21 16
22 // Client side proxy that forwards messages synchronously to a 17 // Client side proxy that forwards messages synchronously to a
23 // CommandBufferStub. 18 // CommandBufferStub.
24 class CommandBufferProxy : public gpu::CommandBuffer { 19 class GPU_EXPORT CommandBufferProxy : public gpu::CommandBuffer {
25 public: 20 public:
26 typedef base::Callback<void( 21 typedef base::Callback<void(
27 const std::string& msg, int id)> GpuConsoleMessageCallback; 22 const std::string& msg, int id)> GpuConsoleMessageCallback;
28 23
29 CommandBufferProxy() { } 24 CommandBufferProxy() { }
30 25
31 virtual ~CommandBufferProxy() { } 26 virtual ~CommandBufferProxy() { }
32 27
33 virtual int GetRouteID() const = 0; 28 virtual int GetRouteID() const = 0;
34 29
(...skipping 18 matching lines...) Expand all
53 // and bound as a texture in any other. 48 // and bound as a texture in any other.
54 virtual bool SetParent(CommandBufferProxy* parent_command_buffer, 49 virtual bool SetParent(CommandBufferProxy* parent_command_buffer,
55 uint32 parent_texture_id) = 0; 50 uint32 parent_texture_id) = 0;
56 51
57 virtual void SetChannelErrorCallback(const base::Closure& callback) = 0; 52 virtual void SetChannelErrorCallback(const base::Closure& callback) = 0;
58 53
59 // Set a task that will be invoked the next time the window becomes invalid 54 // Set a task that will be invoked the next time the window becomes invalid
60 // and needs to be repainted. Takes ownership of task. 55 // and needs to be repainted. Takes ownership of task.
61 virtual void SetNotifyRepaintTask(const base::Closure& callback) = 0; 56 virtual void SetNotifyRepaintTask(const base::Closure& callback) = 0;
62 57
63 // Sends an IPC message to create a GpuVideoDecodeAccelerator. Creates and
64 // returns a pointer to a GpuVideoDecodeAcceleratorHost.
65 // Returns NULL on failure to create the GpuVideoDecodeAcceleratorHost.
66 // Note that the GpuVideoDecodeAccelerator may still fail to be created in
67 // the GPU process, even if this returns non-NULL. In this case the client is
68 // notified of an error later.
69 virtual scoped_refptr<GpuVideoDecodeAcceleratorHost> CreateVideoDecoder(
70 media::VideoCodecProfile profile,
71 media::VideoDecodeAccelerator::Client* client) = 0;
72
73 virtual void SetOnConsoleMessageCallback( 58 virtual void SetOnConsoleMessageCallback(
74 const GpuConsoleMessageCallback& callback) = 0; 59 const GpuConsoleMessageCallback& callback) = 0;
75 60
76 private: 61 private:
77 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); 62 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy);
78 }; 63 };
79 64
80 #endif // ENABLE_GPU 65 #endif // GPU_IPC_COMMAND_BUFFER_PROXY_H_
81
82 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_H_
OLDNEW
« no previous file with comments | « gpu/gpu_ipc.gypi ('k') | gpu/ipc/command_buffer_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698