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

Side by Side Diff: content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h

Issue 301973010: Remove IOSurfaceSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_
6 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_
7 7
8 #include <IOSurface/IOSurfaceAPI.h>
9
8 #include "base/mac/scoped_cftyperef.h" 10 #include "base/mac/scoped_cftyperef.h"
9 #include "content/common/gpu/client/gpu_memory_buffer_impl.h" 11 #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
10 12
11 class IOSurfaceSupport;
12
13 namespace content { 13 namespace content {
14 14
15 // Implementation of GPU memory buffer based on IO surfaces. 15 // Implementation of GPU memory buffer based on IO surfaces.
16 class GpuMemoryBufferImplIOSurface : public GpuMemoryBufferImpl { 16 class GpuMemoryBufferImplIOSurface : public GpuMemoryBufferImpl {
17 public: 17 public:
18 GpuMemoryBufferImplIOSurface(const gfx::Size& size, unsigned internalformat); 18 GpuMemoryBufferImplIOSurface(const gfx::Size& size, unsigned internalformat);
19 virtual ~GpuMemoryBufferImplIOSurface(); 19 virtual ~GpuMemoryBufferImplIOSurface();
20 20
21 static bool IsFormatSupported(unsigned internalformat); 21 static bool IsFormatSupported(unsigned internalformat);
22 static bool IsUsageSupported(unsigned usage); 22 static bool IsUsageSupported(unsigned usage);
23 static bool IsConfigurationSupported(unsigned internalformat, unsigned usage); 23 static bool IsConfigurationSupported(unsigned internalformat, unsigned usage);
24 static uint32 PixelFormat(unsigned internalformat); 24 static uint32 PixelFormat(unsigned internalformat);
25 25
26 bool InitializeFromHandle(gfx::GpuMemoryBufferHandle handle); 26 bool InitializeFromHandle(gfx::GpuMemoryBufferHandle handle);
27 27
28 // Overridden from gfx::GpuMemoryBuffer: 28 // Overridden from gfx::GpuMemoryBuffer:
29 virtual void* Map() OVERRIDE; 29 virtual void* Map() OVERRIDE;
30 virtual void Unmap() OVERRIDE; 30 virtual void Unmap() OVERRIDE;
31 virtual uint32 GetStride() const OVERRIDE; 31 virtual uint32 GetStride() const OVERRIDE;
32 virtual gfx::GpuMemoryBufferHandle GetHandle() const OVERRIDE; 32 virtual gfx::GpuMemoryBufferHandle GetHandle() const OVERRIDE;
33 33
34 private: 34 private:
35 IOSurfaceSupport* io_surface_support_; 35 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
36 base::ScopedCFTypeRef<CFTypeRef> io_surface_;
37 36
38 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface); 37 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface);
39 }; 38 };
40 39
41 } // namespace content 40 } // namespace content
42 41
43 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ 42 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/common/gpu/client/gpu_memory_buffer_impl_io_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698