| 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 CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_ |
| 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_ |
| 7 | 7 |
| 8 #include "content/common/gpu/client/gpu_memory_buffer_impl.h" | 8 #include "content/common/gpu/client/gpu_memory_buffer_impl.h" |
| 9 | 9 |
| 10 struct ANativeWindow; | 10 struct ANativeWindow; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 const gfx::Size& size, | 31 const gfx::Size& size, |
| 32 Format format, | 32 Format format, |
| 33 const DestructionCallback& callback); | 33 const DestructionCallback& callback); |
| 34 | 34 |
| 35 static void DeletedByChildProcess(gfx::GpuMemoryBufferId id, | 35 static void DeletedByChildProcess(gfx::GpuMemoryBufferId id, |
| 36 int child_client_id, | 36 int child_client_id, |
| 37 uint32_t sync_point); | 37 uint32_t sync_point); |
| 38 | 38 |
| 39 static bool IsFormatSupported(Format format); | 39 static bool IsFormatSupported(Format format); |
| 40 static bool IsUsageSupported(Usage usage); | 40 static bool IsUsageSupported(Usage usage); |
| 41 static bool IsConfigurationSupported(Format format, Usage usage); | |
| 42 static int WindowFormat(Format format); | |
| 43 | 41 |
| 44 // Overridden from gfx::GpuMemoryBuffer: | 42 // Overridden from gfx::GpuMemoryBuffer: |
| 45 virtual void* Map() override; | 43 void* Map() override; |
| 46 virtual void Unmap() override; | 44 void Unmap() override; |
| 47 virtual gfx::GpuMemoryBufferHandle GetHandle() const override; | 45 gfx::GpuMemoryBufferHandle GetHandle() const override; |
| 48 virtual uint32 GetStride() const override; | 46 uint32 GetStride() const override; |
| 49 | 47 |
| 50 private: | 48 private: |
| 51 GpuMemoryBufferImplSurfaceTexture(gfx::GpuMemoryBufferId id, | 49 GpuMemoryBufferImplSurfaceTexture(gfx::GpuMemoryBufferId id, |
| 52 const gfx::Size& size, | 50 const gfx::Size& size, |
| 53 Format format, | 51 Format format, |
| 54 const DestructionCallback& callback, | 52 const DestructionCallback& callback, |
| 55 ANativeWindow* native_window); | 53 ANativeWindow* native_window); |
| 56 virtual ~GpuMemoryBufferImplSurfaceTexture(); | 54 ~GpuMemoryBufferImplSurfaceTexture() override; |
| 55 |
| 56 static int WindowFormat(Format format); |
| 57 | 57 |
| 58 ANativeWindow* native_window_; | 58 ANativeWindow* native_window_; |
| 59 size_t stride_; | 59 size_t stride_; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplSurfaceTexture); | 61 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplSurfaceTexture); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // namespace content | 64 } // namespace content |
| 65 | 65 |
| 66 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_ | 66 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_ |
| OLD | NEW |