| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_SURFACE_TEXTURE_H_ | 5 #ifndef GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_ |
| 6 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_ | 6 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_ |
| 7 | 7 |
| 8 #include <android/native_window.h> | 8 #include <android/native_window.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 static base::Closure AllocateForTesting(const gfx::Size& size, | 35 static base::Closure AllocateForTesting(const gfx::Size& size, |
| 36 gfx::BufferFormat format, | 36 gfx::BufferFormat format, |
| 37 gfx::BufferUsage usage, | 37 gfx::BufferUsage usage, |
| 38 gfx::GpuMemoryBufferHandle* handle); | 38 gfx::GpuMemoryBufferHandle* handle); |
| 39 | 39 |
| 40 // Overridden from gfx::GpuMemoryBuffer: | 40 // Overridden from gfx::GpuMemoryBuffer: |
| 41 bool Map() override; | 41 bool Map() override; |
| 42 void* memory(size_t plane) override; | 42 void* memory(size_t plane) override; |
| 43 void Unmap() override; | 43 void Unmap() override; |
| 44 int stride(size_t plane) const override; | 44 uint32_t stride(size_t plane) const override; |
| 45 gfx::GpuMemoryBufferHandle GetHandle() const override; | 45 gfx::GpuMemoryBufferHandle GetHandle() const override; |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 GpuMemoryBufferImplSurfaceTexture(gfx::GpuMemoryBufferId id, | 48 GpuMemoryBufferImplSurfaceTexture(gfx::GpuMemoryBufferId id, |
| 49 const gfx::Size& size, | 49 const gfx::Size& size, |
| 50 gfx::BufferFormat format, | 50 gfx::BufferFormat format, |
| 51 const DestructionCallback& callback, | 51 const DestructionCallback& callback, |
| 52 ANativeWindow* native_window); | 52 ANativeWindow* native_window); |
| 53 | 53 |
| 54 ANativeWindow* native_window_; | 54 ANativeWindow* native_window_; |
| 55 ANativeWindow_Buffer buffer_; | 55 ANativeWindow_Buffer buffer_; |
| 56 | 56 |
| 57 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplSurfaceTexture); | 57 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplSurfaceTexture); |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 } // namespace gpu | 60 } // namespace gpu |
| 61 | 61 |
| 62 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_ | 62 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_ |
| OLD | NEW |