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

Side by Side Diff: services/ui/public/cpp/gpu/mojo_gpu_memory_buffer_manager.h

Issue 2526683002: gpu: Rename AllocateGpuMemoryBuffer to CreateGpuMemoryBuffer. (Closed)
Patch Set: . Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 SERVICES_UI_PUBLIC_CPP_GPU_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ 5 #ifndef SERVICES_UI_PUBLIC_CPP_GPU_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_
6 #define SERVICES_UI_PUBLIC_CPP_GPU_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ 6 #define SERVICES_UI_PUBLIC_CPP_GPU_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 28 matching lines...) Expand all
39 void TearDownThread(); 39 void TearDownThread();
40 void AllocateGpuMemoryBufferOnThread(const gfx::Size& size, 40 void AllocateGpuMemoryBufferOnThread(const gfx::Size& size,
41 gfx::BufferFormat format, 41 gfx::BufferFormat format,
42 gfx::BufferUsage usage, 42 gfx::BufferUsage usage,
43 gfx::GpuMemoryBufferHandle* handle, 43 gfx::GpuMemoryBufferHandle* handle,
44 base::WaitableEvent* wait); 44 base::WaitableEvent* wait);
45 void DeletedGpuMemoryBuffer(gfx::GpuMemoryBufferId id, 45 void DeletedGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
46 const gpu::SyncToken& sync_token); 46 const gpu::SyncToken& sync_token);
47 47
48 // Overridden from gpu::GpuMemoryBufferManager: 48 // Overridden from gpu::GpuMemoryBufferManager:
49 std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( 49 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBuffer(
50 const gfx::Size& size, 50 const gfx::Size& size,
51 gfx::BufferFormat format, 51 gfx::BufferFormat format,
52 gfx::BufferUsage usage, 52 gfx::BufferUsage usage,
53 gpu::SurfaceHandle surface_handle) override; 53 gpu::SurfaceHandle surface_handle) override;
54 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( 54 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle(
55 const gfx::GpuMemoryBufferHandle& handle, 55 const gfx::GpuMemoryBufferHandle& handle,
56 const gfx::Size& size, 56 const gfx::Size& size,
57 gfx::BufferFormat format) override; 57 gfx::BufferFormat format) override;
58 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, 58 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer,
59 const gpu::SyncToken& sync_token) override; 59 const gpu::SyncToken& sync_token) override;
60 int counter_ = 0; 60 int counter_ = 0;
61 // TODO(sad): Explore the option of doing this from an existing thread. 61 // TODO(sad): Explore the option of doing this from an existing thread.
62 base::Thread thread_; 62 base::Thread thread_;
63 mojom::GpuServicePtr gpu_service_; 63 mojom::GpuServicePtr gpu_service_;
64 base::WeakPtr<MojoGpuMemoryBufferManager> weak_ptr_; 64 base::WeakPtr<MojoGpuMemoryBufferManager> weak_ptr_;
65 base::WeakPtrFactory<MojoGpuMemoryBufferManager> weak_ptr_factory_; 65 base::WeakPtrFactory<MojoGpuMemoryBufferManager> weak_ptr_factory_;
66 66
67 DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferManager); 67 DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferManager);
68 }; 68 };
69 69
70 } // namespace ui 70 } // namespace ui
71 71
72 #endif // SERVICES_UI_PUBLIC_CPP_GPU_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ 72 #endif // SERVICES_UI_PUBLIC_CPP_GPU_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698