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

Side by Side Diff: services/ui/ws/mus_gpu_memory_buffer_manager.h

Issue 2487783003: gpu: Directly cast ClientBuffer to gfx::GpuMemoryBuffer (Closed)
Patch Set: . 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 19 matching lines...) Expand all
30 // Overridden from gpu::GpuMemoryBufferManager: 30 // Overridden from gpu::GpuMemoryBufferManager:
31 std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( 31 std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
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 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer(
41 ClientBuffer buffer) override;
42 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, 40 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer,
43 const gpu::SyncToken& sync_token) override; 41 const gpu::SyncToken& sync_token) override;
44 42
45 private: 43 private:
46 DISALLOW_COPY_AND_ASSIGN(MusGpuMemoryBufferManager); 44 DISALLOW_COPY_AND_ASSIGN(MusGpuMemoryBufferManager);
47 45
48 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, 46 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
49 int client_id, 47 int client_id,
50 bool is_native, 48 bool is_native,
51 const gpu::SyncToken& sync_token); 49 const gpu::SyncToken& sync_token);
52 50
53 mojom::GpuServiceInternal* gpu_service_; 51 mojom::GpuServiceInternal* gpu_service_;
54 const int client_id_; 52 const int client_id_;
55 base::WeakPtrFactory<MusGpuMemoryBufferManager> weak_factory_; 53 base::WeakPtrFactory<MusGpuMemoryBufferManager> weak_factory_;
56 }; 54 };
57 55
58 } // namespace ws 56 } // namespace ws
59 } // namespace ui 57 } // namespace ui
60 58
61 #endif // SERVICES_UI_WS_MUS_GPU_MEMORY_BUFFER_MANAGER_H_ 59 #endif // SERVICES_UI_WS_MUS_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « services/ui/public/cpp/mojo_gpu_memory_buffer_manager.cc ('k') | services/ui/ws/mus_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698