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

Side by Side Diff: gpu/ipc/client/gpu_memory_buffer_impl_io_surface.h

Issue 2473973002: NOT for review (for discussion): Query IOSurfaceIsInUse in the browser process
Patch Set: Created 4 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 GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ 5 #ifndef GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_
6 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ 6 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_
7 7
8 #include <IOSurface/IOSurface.h> 8 #include <IOSurface/IOSurface.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 27 matching lines...) Expand all
38 gfx::BufferFormat format, 38 gfx::BufferFormat format,
39 gfx::BufferUsage usage, 39 gfx::BufferUsage usage,
40 gfx::GpuMemoryBufferHandle* handle); 40 gfx::GpuMemoryBufferHandle* handle);
41 41
42 // Overridden from gfx::GpuMemoryBuffer: 42 // Overridden from gfx::GpuMemoryBuffer:
43 bool Map() override; 43 bool Map() override;
44 void* memory(size_t plane) override; 44 void* memory(size_t plane) override;
45 void Unmap() override; 45 void Unmap() override;
46 int stride(size_t plane) const override; 46 int stride(size_t plane) const override;
47 void SetColorSpaceForScanout(const gfx::ColorSpace& color_space) override; 47 void SetColorSpaceForScanout(const gfx::ColorSpace& color_space) override;
48 bool IsInUseByMacOSWindowServer() const override;
48 gfx::GpuMemoryBufferHandle GetHandle() const override; 49 gfx::GpuMemoryBufferHandle GetHandle() const override;
49 50
50 private: 51 private:
51 GpuMemoryBufferImplIOSurface(gfx::GpuMemoryBufferId id, 52 GpuMemoryBufferImplIOSurface(gfx::GpuMemoryBufferId id,
52 const gfx::Size& size, 53 const gfx::Size& size,
53 gfx::BufferFormat format, 54 gfx::BufferFormat format,
54 const DestructionCallback& callback, 55 const DestructionCallback& callback,
55 IOSurfaceRef io_surface, 56 IOSurfaceRef io_surface,
56 uint32_t lock_flags); 57 uint32_t lock_flags);
57 58
58 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_; 59 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
59 uint32_t lock_flags_; 60 uint32_t lock_flags_;
60 // Cache the color space, because re-assigning the same value can be 61 // Cache the color space, because re-assigning the same value can be
61 // expensive. 62 // expensive.
62 gfx::ColorSpace color_space_; 63 gfx::ColorSpace color_space_;
63 64
64 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface); 65 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface);
65 }; 66 };
66 67
67 } // namespace gpu 68 } // namespace gpu
68 69
69 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ 70 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/ipc/client/gpu_memory_buffer_impl_io_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698