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

Side by Side Diff: content/renderer/ggl.h

Issue 6711013: Fix crash with pepper 3D on multiple windows in same renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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/renderer/pepper_platform_context_3d_impl.cc ('k') | content/renderer/ggl.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 // This API is consistent with other OpenGL setup APIs like window's WGL 5 // This API is consistent with other OpenGL setup APIs like window's WGL
6 // and pepper's PGL. This API is used to manage OpenGL contexts in the Chrome 6 // and pepper's PGL. This API is used to manage OpenGL contexts in the Chrome
7 // renderer process in a way that is consistent with other platforms. It is 7 // renderer process in a way that is consistent with other platforms. It is
8 // a C style API to ease porting of existing OpenGL software to Chrome. 8 // a C style API to ease porting of existing OpenGL software to Chrome.
9 9
10 #ifndef CONTENT_RENDERER_GGL_H_ 10 #ifndef CONTENT_RENDERER_GGL_H_
11 #define CONTENT_RENDERER_GGL_H_ 11 #define CONTENT_RENDERER_GGL_H_
12 #pragma once 12 #pragma once
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/weak_ptr.h"
15 #include "ui/gfx/native_widget_types.h" 16 #include "ui/gfx/native_widget_types.h"
16 #include "ui/gfx/size.h" 17 #include "ui/gfx/size.h"
17 18
18 class GpuChannelHost; 19 class GpuChannelHost;
19 class MessageLoop; 20 class MessageLoop;
20 class CommandBufferProxy; 21 class CommandBufferProxy;
21 22
22 namespace gpu { 23 namespace gpu {
23 namespace gles2 { 24 namespace gles2 {
24 class GLES2Implementation; 25 class GLES2Implementation;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 136
136 // For a view context, display everything that has been rendered since the 137 // For a view context, display everything that has been rendered since the
137 // last call. For an offscreen context, resolve everything that has been 138 // last call. For an offscreen context, resolve everything that has been
138 // rendered since the last call to a copy that can be accessed by the parent 139 // rendered since the last call to a copy that can be accessed by the parent
139 // context. 140 // context.
140 bool SwapBuffers(Context* context); 141 bool SwapBuffers(Context* context);
141 142
142 // Destroy the given GGL context. 143 // Destroy the given GGL context.
143 bool DestroyContext(Context* context); 144 bool DestroyContext(Context* context);
144 145
146 // Gets a weak reference to the context.
147 base::WeakPtr<Context> GetWeakContextReference(Context* context);
apatrick_chromium 2011/03/17 20:15:38 I regret making ggl c-style now :(
148
145 // Create a hardware video decode engine corresponding to the context. 149 // Create a hardware video decode engine corresponding to the context.
146 media::VideoDecodeEngine* CreateVideoDecodeEngine(Context* context); 150 media::VideoDecodeEngine* CreateVideoDecodeEngine(Context* context);
147 151
148 // Create a hardware video decode context to pair with the hardware video 152 // Create a hardware video decode context to pair with the hardware video
149 // decode engine. It can also be used with a software decode engine. 153 // decode engine. It can also be used with a software decode engine.
150 // 154 //
151 // Set |hardware_decoder| to true if this context is for a hardware video 155 // Set |hardware_decoder| to true if this context is for a hardware video
152 // engine. |message_loop| is where the decode context should run on. 156 // engine. |message_loop| is where the decode context should run on.
153 media::VideoDecodeContext* CreateVideoDecodeContext(Context* context, 157 media::VideoDecodeContext* CreateVideoDecodeContext(Context* context,
154 MessageLoop* message_loop, 158 MessageLoop* message_loop,
(...skipping 11 matching lines...) Expand all
166 170
167 // Return true if GPU process reported context lost or there was a problem 171 // Return true if GPU process reported context lost or there was a problem
168 // communicating with the GPU process. 172 // communicating with the GPU process.
169 bool IsCommandBufferContextLost(Context* context); 173 bool IsCommandBufferContextLost(Context* context);
170 174
171 CommandBufferProxy* GetCommandBufferProxy(Context* context); 175 CommandBufferProxy* GetCommandBufferProxy(Context* context);
172 176
173 } // namespace ggl 177 } // namespace ggl
174 178
175 #endif // CONTENT_RENDERER_GGL_H_ 179 #endif // CONTENT_RENDERER_GGL_H_
OLDNEW
« no previous file with comments | « chrome/renderer/pepper_platform_context_3d_impl.cc ('k') | content/renderer/ggl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698