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

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

Issue 1412223009: Reland: GpuMemoryBuffer interface change: Map(**) to Map() and memory(plane); stride(plane) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Win X64 compile fix Created 5 years, 2 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/IOSurface.h> 8 #include <IOSurface/IOSurface.h>
9 9
10 #include "base/mac/scoped_cftyperef.h" 10 #include "base/mac/scoped_cftyperef.h"
(...skipping 16 matching lines...) Expand all
27 27
28 static bool IsConfigurationSupported(gfx::BufferFormat format, 28 static bool IsConfigurationSupported(gfx::BufferFormat format,
29 gfx::BufferUsage usage); 29 gfx::BufferUsage usage);
30 30
31 static base::Closure AllocateForTesting(const gfx::Size& size, 31 static base::Closure AllocateForTesting(const gfx::Size& size,
32 gfx::BufferFormat format, 32 gfx::BufferFormat format,
33 gfx::BufferUsage usage, 33 gfx::BufferUsage usage,
34 gfx::GpuMemoryBufferHandle* handle); 34 gfx::GpuMemoryBufferHandle* handle);
35 35
36 // Overridden from gfx::GpuMemoryBuffer: 36 // Overridden from gfx::GpuMemoryBuffer:
37 bool Map(void** data) override; 37 bool Map() override;
38 void* memory(size_t plane) override;
38 void Unmap() override; 39 void Unmap() override;
39 void GetStride(int* stride) const override; 40 int stride(size_t plane) const override;
40 gfx::GpuMemoryBufferHandle GetHandle() const override; 41 gfx::GpuMemoryBufferHandle GetHandle() const override;
41 42
42 private: 43 private:
43 GpuMemoryBufferImplIOSurface(gfx::GpuMemoryBufferId id, 44 GpuMemoryBufferImplIOSurface(gfx::GpuMemoryBufferId id,
44 const gfx::Size& size, 45 const gfx::Size& size,
45 gfx::BufferFormat format, 46 gfx::BufferFormat format,
46 const DestructionCallback& callback, 47 const DestructionCallback& callback,
47 IOSurfaceRef io_surface, 48 IOSurfaceRef io_surface,
48 uint32_t lock_flags); 49 uint32_t lock_flags);
49 50
50 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_; 51 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
51 uint32_t lock_flags_; 52 uint32_t lock_flags_;
52 53
53 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface); 54 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface);
54 }; 55 };
55 56
56 } // namespace content 57 } // namespace content
57 58
58 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ 59 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_
OLDNEW
« no previous file with comments | « content/child/child_thread_impl_browsertest.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