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

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

Issue 2298353002: gfx: Use unsigned strides for gpu memory buffers. (Closed)
Patch Set: . Created 4 years, 3 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 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
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_
OLDNEW
« no previous file with comments | « gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.cc ('k') | gpu/ipc/client/gpu_memory_buffer_impl_surface_texture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698