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

Side by Side Diff: ui/gfx/surface/accelerated_surface_mac.h

Issue 7645004: Add gl.dll, compositor.dll, and surface.dll. (Closed) Base URL: svn://svn.chromium.org/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 UI_GFX_SURFACE_ACCELERATED_SURFACE_MAC_H_ 5 #ifndef UI_GFX_SURFACE_ACCELERATED_SURFACE_MAC_H_
6 #define UI_GFX_SURFACE_ACCELERATED_SURFACE_MAC_H_ 6 #define UI_GFX_SURFACE_ACCELERATED_SURFACE_MAC_H_
7 #pragma once 7 #pragma once
8 8
9 #include <CoreFoundation/CoreFoundation.h> 9 #include <CoreFoundation/CoreFoundation.h>
10 10
11 #include "base/callback_old.h" 11 #include "base/callback_old.h"
12 #include "base/mac/scoped_cftyperef.h" 12 #include "base/mac/scoped_cftyperef.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "ui/gfx/rect.h" 14 #include "ui/gfx/rect.h"
15 #include "ui/gfx/size.h" 15 #include "ui/gfx/size.h"
16 #include "ui/gfx/gl/gl_context.h" 16 #include "ui/gfx/gl/gl_context.h"
17 #include "ui/gfx/gl/gl_surface.h" 17 #include "ui/gfx/gl/gl_surface.h"
18 #include "ui/gfx/surface/surface_export.h"
18 #include "ui/gfx/surface/transport_dib.h" 19 #include "ui/gfx/surface/transport_dib.h"
19 20
20 // Should not include GL headers in a header file. Forward declare these types 21 // Should not include GL headers in a header file. Forward declare these types
21 // instead. 22 // instead.
22 typedef struct _CGLContextObject* CGLContextObj; 23 typedef struct _CGLContextObject* CGLContextObj;
23 typedef unsigned int GLenum; 24 typedef unsigned int GLenum;
24 typedef unsigned int GLuint; 25 typedef unsigned int GLuint;
25 26
26 namespace gfx { 27 namespace gfx {
27 class Rect; 28 class Rect;
28 } 29 }
29 30
30 // Encapsulates an accelerated GL surface that can be shared across processes 31 // Encapsulates an accelerated GL surface that can be shared across processes
31 // on systems that support it (10.6 and above). For systems that do not, it 32 // on systems that support it (10.6 and above). For systems that do not, it
32 // uses a regular dib. There will either be an IOSurface or a TransportDIB, 33 // uses a regular dib. There will either be an IOSurface or a TransportDIB,
33 // never both. 34 // never both.
34 35
35 class AcceleratedSurface { 36 class SURFACE_EXPORT AcceleratedSurface {
36 public: 37 public:
37 AcceleratedSurface(); 38 AcceleratedSurface();
38 virtual ~AcceleratedSurface(); 39 virtual ~AcceleratedSurface();
39 40
40 // Set up internal buffers. |share_context|, if non-NULL, is a context 41 // Set up internal buffers. |share_context|, if non-NULL, is a context
41 // with which the internally created OpenGL context shares textures and 42 // with which the internally created OpenGL context shares textures and
42 // other resources. |allocate_fbo| indicates whether or not this surface 43 // other resources. |allocate_fbo| indicates whether or not this surface
43 // should allocate an offscreen frame buffer object (FBO) internally. If 44 // should allocate an offscreen frame buffer object (FBO) internally. If
44 // not, then the user is expected to allocate one. NOTE that allocating 45 // not, then the user is expected to allocate one. NOTE that allocating
45 // an FBO internally does NOT work properly with client code which uses 46 // an FBO internally does NOT work properly with client code which uses
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // true. 168 // true.
168 GLuint fbo_; 169 GLuint fbo_;
169 GLuint depth_stencil_renderbuffer_; 170 GLuint depth_stencil_renderbuffer_;
170 // Allocate a TransportDIB in the renderer. 171 // Allocate a TransportDIB in the renderer.
171 scoped_ptr<Callback2<size_t, TransportDIB::Handle*>::Type> 172 scoped_ptr<Callback2<size_t, TransportDIB::Handle*>::Type>
172 dib_alloc_callback_; 173 dib_alloc_callback_;
173 scoped_ptr<Callback1<TransportDIB::Id>::Type> dib_free_callback_; 174 scoped_ptr<Callback1<TransportDIB::Id>::Type> dib_free_callback_;
174 }; 175 };
175 176
176 #endif // UI_GFX_SURFACE_ACCELERATED_SURFACE_MAC_H_ 177 #endif // UI_GFX_SURFACE_ACCELERATED_SURFACE_MAC_H_
OLDNEW
« no previous file with comments | « ui/gfx/surface/accelerated_surface_linux.h ('k') | ui/gfx/surface/accelerated_surface_wayland.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698