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

Side by Side Diff: services/ui/ws/mus_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_WS_MUS_GPU_MEMORY_BUFFER_MANAGER_H_ 5 #ifndef SERVICES_UI_WS_MUS_GPU_MEMORY_BUFFER_MANAGER_H_
6 #define SERVICES_UI_WS_MUS_GPU_MEMORY_BUFFER_MANAGER_H_ 6 #define SERVICES_UI_WS_MUS_GPU_MEMORY_BUFFER_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 21 matching lines...) Expand all
32 const gfx::Size& size, 32 const gfx::Size& size,
33 gfx::BufferFormat format, 33 gfx::BufferFormat format,
34 gfx::BufferUsage usage, 34 gfx::BufferUsage usage,
35 gpu::SurfaceHandle surface_handle) override; 35 gpu::SurfaceHandle surface_handle) override;
36 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( 36 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle(
37 const gfx::GpuMemoryBufferHandle& handle, 37 const gfx::GpuMemoryBufferHandle& handle,
38 const gfx::Size& size, 38 const gfx::Size& size,
39 gfx::BufferFormat format) override; 39 gfx::BufferFormat format) override;
40 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, 40 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer,
41 const gpu::SyncToken& sync_token) override; 41 const gpu::SyncToken& sync_token) override;
42 std::unique_ptr<gfx::GpuFence> CreateGpuFence() override;
43 std::unique_ptr<gfx::GpuFence> CreateGpuFenceFromHandle(
44 const gfx::GpuFenceHandle& handle) override;
45 gfx::GpuFence* GpuFenceFromClientFence(ClientFence fence) override;
42 46
43 private: 47 private:
44 DISALLOW_COPY_AND_ASSIGN(MusGpuMemoryBufferManager); 48 DISALLOW_COPY_AND_ASSIGN(MusGpuMemoryBufferManager);
45 49
46 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, 50 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
47 int client_id, 51 int client_id,
48 bool is_native, 52 bool is_native,
49 const gpu::SyncToken& sync_token); 53 const gpu::SyncToken& sync_token);
50 54
51 mojom::GpuServiceInternal* gpu_service_; 55 mojom::GpuServiceInternal* gpu_service_;
52 const int client_id_; 56 const int client_id_;
53 base::WeakPtrFactory<MusGpuMemoryBufferManager> weak_factory_; 57 base::WeakPtrFactory<MusGpuMemoryBufferManager> weak_factory_;
54 }; 58 };
55 59
56 } // namespace ws 60 } // namespace ws
57 } // namespace ui 61 } // namespace ui
58 62
59 #endif // SERVICES_UI_WS_MUS_GPU_MEMORY_BUFFER_MANAGER_H_ 63 #endif // SERVICES_UI_WS_MUS_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698