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

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

Issue 701033005: content: Move type selection logic out of GpuMemoryBufferImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review feedback Created 6 years, 1 month 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> 8 #include <IOSurface/IOSurfaceAPI.h>
9 9
10 #include "base/mac/scoped_cftyperef.h" 10 #include "base/mac/scoped_cftyperef.h"
(...skipping 21 matching lines...) Expand all
32 const gfx::Size& size, 32 const gfx::Size& size,
33 Format format, 33 Format format,
34 const DestructionCallback& callback); 34 const DestructionCallback& callback);
35 35
36 static void DeletedByChildProcess(gfx::GpuMemoryBufferId id, 36 static void DeletedByChildProcess(gfx::GpuMemoryBufferId id,
37 int child_client_id, 37 int child_client_id,
38 uint32_t sync_point); 38 uint32_t sync_point);
39 39
40 static bool IsFormatSupported(Format format); 40 static bool IsFormatSupported(Format format);
41 static bool IsUsageSupported(Usage usage); 41 static bool IsUsageSupported(Usage usage);
42 static bool IsConfigurationSupported(Format format, Usage usage);
43 static uint32 PixelFormat(Format format);
44 42
45 // Overridden from gfx::GpuMemoryBuffer: 43 // Overridden from gfx::GpuMemoryBuffer:
46 void* Map() override; 44 void* Map() override;
47 void Unmap() override; 45 void Unmap() override;
48 uint32 GetStride() const override; 46 uint32 GetStride() const override;
49 gfx::GpuMemoryBufferHandle GetHandle() const override; 47 gfx::GpuMemoryBufferHandle GetHandle() const override;
50 48
51 private: 49 private:
52 GpuMemoryBufferImplIOSurface(gfx::GpuMemoryBufferId id, 50 GpuMemoryBufferImplIOSurface(gfx::GpuMemoryBufferId id,
53 const gfx::Size& size, 51 const gfx::Size& size,
54 Format format, 52 Format format,
55 const DestructionCallback& callback, 53 const DestructionCallback& callback,
56 IOSurfaceRef io_surface); 54 IOSurfaceRef io_surface);
57 ~GpuMemoryBufferImplIOSurface() override; 55 ~GpuMemoryBufferImplIOSurface() override;
58 56
59 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_; 57 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
60 58
61 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface); 59 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface);
62 }; 60 };
63 61
64 } // namespace content 62 } // namespace content
65 63
66 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ 64 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698