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

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

Issue 337303003: CARemoteLayer alive-ish (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_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 // We are backed by an offscreen surface for the purposes of creating
17 // a context, but use FBOs to render to texture backed IOSurface
18 class IOSurfaceStorageProvider
19 : public ImageTransportSurfaceFBO::StorageProvider {
20 public:
21 IOSurfaceStorageProvider();
22 virtual ~IOSurfaceStorageProvider();
23
24 // ImageTransportSurfaceFBO::StorageProvider implementation:
25 virtual gfx::Size GetRoundedSize(gfx::Size size) OVERRIDE;
26 virtual bool AllocateColorBufferStorage(
27 CGLContextObj context, gfx::Size size) OVERRIDE;
28 virtual void FreeColorBufferStorage() OVERRIDE;
29 virtual void PopulateSwapBuffersStorageParams(
30 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params* params) OVERRIDE;
31 virtual void PopulateSubBufferStorageParams(
32 GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params* params) OVERRIDE;
33
34 private:
35 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
36
37 // The id of |io_surface_| or 0 if that's NULL.
38 uint64 io_surface_handle_;
39 };
40
41 } // namespace content
42
43 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_MAC_H_
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface_calayer_mac.mm ('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