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

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.h

Issue 7554015: Implemented support for GL constext share groups in the renderer process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #if defined(ENABLE_GPU) 9 #if defined(ENABLE_GPU)
10 10
11 #include <queue> 11 #include <queue>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/process.h" 16 #include "base/process.h"
17 #include "base/task.h" 17 #include "base/task.h"
18 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" 18 #include "content/common/gpu/media/gpu_video_decode_accelerator.h"
19 #include "gpu/command_buffer/service/command_buffer_service.h" 19 #include "gpu/command_buffer/service/command_buffer_service.h"
20 #include "gpu/command_buffer/service/context_group.h"
20 #include "gpu/command_buffer/service/gpu_scheduler.h" 21 #include "gpu/command_buffer/service/gpu_scheduler.h"
21 #include "ipc/ipc_channel.h" 22 #include "ipc/ipc_channel.h"
22 #include "ipc/ipc_message.h" 23 #include "ipc/ipc_message.h"
23 #include "ui/gfx/native_widget_types.h" 24 #include "ui/gfx/native_widget_types.h"
24 #include "ui/gfx/size.h" 25 #include "ui/gfx/size.h"
25 26
26 class GpuChannel; 27 class GpuChannel;
27 class GpuWatchdog; 28 class GpuWatchdog;
28 29
29 class GpuCommandBufferStub 30 class GpuCommandBufferStub
30 : public IPC::Channel::Listener, 31 : public IPC::Channel::Listener,
31 public IPC::Message::Sender, 32 public IPC::Message::Sender,
32 public base::SupportsWeakPtr<GpuCommandBufferStub> { 33 public base::SupportsWeakPtr<GpuCommandBufferStub> {
33 public: 34 public:
34 GpuCommandBufferStub( 35 GpuCommandBufferStub(
35 GpuChannel* channel, 36 GpuChannel* channel,
37 GpuCommandBufferStub* share_group,
36 gfx::PluginWindowHandle handle, 38 gfx::PluginWindowHandle handle,
37 const gfx::Size& size, 39 const gfx::Size& size,
38 const gpu::gles2::DisallowedExtensions& disallowed_extensions, 40 const gpu::gles2::DisallowedExtensions& disallowed_extensions,
39 const std::string& allowed_extensions, 41 const std::string& allowed_extensions,
40 const std::vector<int32>& attribs, 42 const std::vector<int32>& attribs,
41 int32 route_id, 43 int32 route_id,
42 int32 renderer_id, 44 int32 renderer_id,
43 int32 render_view_id, 45 int32 render_view_id,
44 GpuWatchdog* watchdog, 46 GpuWatchdog* watchdog,
45 bool software); 47 bool software);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 #endif // defined(OS_MACOSX) 128 #endif // defined(OS_MACOSX)
127 129
128 void ResizeCallback(gfx::Size size); 130 void ResizeCallback(gfx::Size size);
129 void ReportState(); 131 void ReportState();
130 132
131 // The lifetime of objects of this class is managed by a GpuChannel. The 133 // The lifetime of objects of this class is managed by a GpuChannel. The
132 // GpuChannels destroy all the GpuCommandBufferStubs that they own when they 134 // GpuChannels destroy all the GpuCommandBufferStubs that they own when they
133 // are destroyed. So a raw pointer is safe. 135 // are destroyed. So a raw pointer is safe.
134 GpuChannel* channel_; 136 GpuChannel* channel_;
135 137
138 // The group of contexts that share namespaces with this context.
139 scoped_refptr<gpu::gles2::ContextGroup> context_group_;
140
136 gfx::PluginWindowHandle handle_; 141 gfx::PluginWindowHandle handle_;
137 gfx::Size initial_size_; 142 gfx::Size initial_size_;
138 gpu::gles2::DisallowedExtensions disallowed_extensions_; 143 gpu::gles2::DisallowedExtensions disallowed_extensions_;
139 std::string allowed_extensions_; 144 std::string allowed_extensions_;
140 std::vector<int32> requested_attribs_; 145 std::vector<int32> requested_attribs_;
141 int32 route_id_; 146 int32 route_id_;
142 bool software_; 147 bool software_;
143 uint32 last_flush_count_; 148 uint32 last_flush_count_;
144 149
145 // The following two fields are used on Mac OS X to identify the window 150 // The following two fields are used on Mac OS X to identify the window
(...skipping 14 matching lines...) Expand all
160 165
161 // The video decoder associated with this stub, if any. 166 // The video decoder associated with this stub, if any.
162 scoped_ptr<GpuVideoDecodeAccelerator> video_decoder_; 167 scoped_ptr<GpuVideoDecodeAccelerator> video_decoder_;
163 168
164 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); 169 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub);
165 }; 170 };
166 171
167 #endif // defined(ENABLE_GPU) 172 #endif // defined(ENABLE_GPU)
168 173
169 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ 174 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698