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

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

Issue 334173006: Clean up GLSurfaceCGL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate review feedback Created 6 years, 6 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
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_IOSURFACE_MAC_H_
6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_IOSURFACE_MAC_H_
7
8 #include "content/common/gpu/image_transport_surface_fbo_mac.h"
9 #include "ui/gl/gl_bindings.h"
10
11 // Note that this must be included after gl_bindings.h to avoid conflicts.
12 #include <OpenGL/CGLIOSurface.h>
13
14 namespace content {
15
16 // Allocate IOSurface-backed storage for an FBO image transport surface.
17 class IOSurfaceStorageProvider
18 : public ImageTransportSurfaceFBO::StorageProvider {
19 public:
20 IOSurfaceStorageProvider();
21 virtual ~IOSurfaceStorageProvider();
22
23 // ImageTransportSurfaceFBO::StorageProvider implementation:
24 virtual gfx::Size GetRoundedSize(gfx::Size size) OVERRIDE;
25 virtual bool AllocateColorBufferStorage(
26 CGLContextObj context, gfx::Size size) OVERRIDE;
27 virtual void FreeColorBufferStorage() OVERRIDE;
28 virtual uint64 GetSurfaceHandle() const OVERRIDE;
29
30 private:
31 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
32
33 // The id of |io_surface_| or 0 if that's NULL.
34 IOSurfaceID io_surface_handle_;
35
36 DISALLOW_COPY_AND_ASSIGN(IOSurfaceStorageProvider);
37 };
38
39 } // namespace content
40
41 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_MAC_H_
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface_fbo_mac.cc ('k') | content/common/gpu/image_transport_surface_iosurface_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698