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

Side by Side Diff: chrome/gpu/gpu_channel.h

Issue 6343006: Route IPC through browser when creating a viewable command buffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 9 years, 10 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/common/render_messages_internal.h ('k') | chrome/gpu/gpu_channel.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_GPU_GPU_CHANNEL_H_ 5 #ifndef CHROME_GPU_GPU_CHANNEL_H_
6 #define CHROME_GPU_GPU_CHANNEL_H_ 6 #define CHROME_GPU_GPU_CHANNEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 53
54 // IPC::Channel::Listener implementation: 54 // IPC::Channel::Listener implementation:
55 virtual bool OnMessageReceived(const IPC::Message& msg); 55 virtual bool OnMessageReceived(const IPC::Message& msg);
56 virtual void OnChannelConnected(int32 peer_pid); 56 virtual void OnChannelConnected(int32 peer_pid);
57 virtual void OnChannelError(); 57 virtual void OnChannelError();
58 58
59 // IPC::Message::Sender implementation: 59 // IPC::Message::Sender implementation:
60 virtual bool Send(IPC::Message* msg); 60 virtual bool Send(IPC::Message* msg);
61 61
62 void CreateViewCommandBuffer(
63 gfx::PluginWindowHandle window,
64 int32 render_view_id,
65 const GPUCreateCommandBufferConfig& init_params,
66 int32* route_id);
67
62 #if defined(OS_MACOSX) 68 #if defined(OS_MACOSX)
63 virtual void AcceleratedSurfaceBuffersSwapped( 69 virtual void AcceleratedSurfaceBuffersSwapped(
64 int32 route_id, uint64 swap_buffers_count); 70 int32 route_id, uint64 swap_buffers_count);
65 void DidDestroySurface(int32 renderer_route_id); 71 void DidDestroySurface(int32 renderer_route_id);
66 72
67 bool IsRenderViewGone(int32 renderer_route_id); 73 bool IsRenderViewGone(int32 renderer_route_id);
68 #endif 74 #endif
69 75
70 private: 76 private:
71 bool OnControlMessageReceived(const IPC::Message& msg); 77 bool OnControlMessageReceived(const IPC::Message& msg);
72 78
73 int GenerateRouteID(); 79 int GenerateRouteID();
74 80
75 // Message handlers. 81 // Message handlers.
76 void OnCreateViewCommandBuffer(
77 gfx::NativeViewId view,
78 int32 render_view_id,
79 const GPUCreateCommandBufferConfig& init_params,
80 int32* route_id);
81 void OnCreateOffscreenCommandBuffer( 82 void OnCreateOffscreenCommandBuffer(
82 int32 parent_route_id, 83 int32 parent_route_id,
83 const gfx::Size& size, 84 const gfx::Size& size,
84 const GPUCreateCommandBufferConfig& init_params, 85 const GPUCreateCommandBufferConfig& init_params,
85 uint32 parent_texture_id, 86 uint32 parent_texture_id,
86 int32* route_id); 87 int32* route_id);
87 void OnDestroyCommandBuffer(int32 route_id); 88 void OnDestroyCommandBuffer(int32 route_id);
88 89
89 void OnCreateVideoDecoder(int32 context_route_id, 90 void OnCreateVideoDecoder(int32 context_route_id,
90 int32 decoder_host_id); 91 int32 decoder_host_id);
(...skipping 23 matching lines...) Expand all
114 std::set<int32> destroyed_renderer_routes_; 115 std::set<int32> destroyed_renderer_routes_;
115 #endif // defined (OS_MACOSX) 116 #endif // defined (OS_MACOSX)
116 #endif // defined (ENABLE_GPU) 117 #endif // defined (ENABLE_GPU)
117 118
118 bool log_messages_; // True if we should log sent and received messages. 119 bool log_messages_; // True if we should log sent and received messages.
119 120
120 DISALLOW_COPY_AND_ASSIGN(GpuChannel); 121 DISALLOW_COPY_AND_ASSIGN(GpuChannel);
121 }; 122 };
122 123
123 #endif // CHROME_GPU_GPU_CHANNEL_H_ 124 #endif // CHROME_GPU_GPU_CHANNEL_H_
OLDNEW
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/gpu/gpu_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698