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

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

Issue 2383753002: gpu: Add GpuFence framework.
Patch Set: rebase 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 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_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ 5 #ifndef SERVICES_UI_PUBLIC_CPP_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_
6 #define SERVICES_UI_PUBLIC_CPP_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ 6 #define SERVICES_UI_PUBLIC_CPP_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 std::unique_ptr<gfx::GpuFence> CreateGpuFence() override;
61 std::unique_ptr<gfx::GpuFence> CreateGpuFenceFromHandle(
62 const gfx::GpuFenceHandle& handle) override;
63 gfx::GpuFence* GpuFenceFromClientFence(ClientFence fence) override;
64
60 int counter_ = 0; 65 int counter_ = 0;
61 // TODO(sad): Explore the option of doing this from an existing thread. 66 // TODO(sad): Explore the option of doing this from an existing thread.
62 base::Thread thread_; 67 base::Thread thread_;
63 mojom::GpuServicePtr gpu_service_; 68 mojom::GpuServicePtr gpu_service_;
64 std::unique_ptr<service_manager::Connector> connector_; 69 std::unique_ptr<service_manager::Connector> connector_;
65 base::WeakPtrFactory<MojoGpuMemoryBufferManager> weak_ptr_factory_; 70 base::WeakPtrFactory<MojoGpuMemoryBufferManager> weak_ptr_factory_;
66 71
67 DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferManager); 72 DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferManager);
68 }; 73 };
69 74
70 } // namespace ui 75 } // namespace ui
71 76
72 #endif // SERVICES_UI_PUBLIC_CPP_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ 77 #endif // SERVICES_UI_PUBLIC_CPP_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698