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

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

Issue 2572703004: exo: Directly create GpuMemoryBufferImpl when a handle is available. (Closed)
Patch Set: null callback 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_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_ 5 #ifndef SERVICES_UI_PUBLIC_CPP_GPU_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_
6 #define SERVICES_UI_PUBLIC_CPP_GPU_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_ 6 #define SERVICES_UI_PUBLIC_CPP_GPU_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 25 matching lines...) Expand all
36 base::WaitableEvent* wait); 36 base::WaitableEvent* wait);
37 void DeletedGpuMemoryBuffer(gfx::GpuMemoryBufferId id, 37 void DeletedGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
38 const gpu::SyncToken& sync_token); 38 const gpu::SyncToken& sync_token);
39 39
40 // Overridden from gpu::GpuMemoryBufferManager: 40 // Overridden from gpu::GpuMemoryBufferManager:
41 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBuffer( 41 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBuffer(
42 const gfx::Size& size, 42 const gfx::Size& size,
43 gfx::BufferFormat format, 43 gfx::BufferFormat format,
44 gfx::BufferUsage usage, 44 gfx::BufferUsage usage,
45 gpu::SurfaceHandle surface_handle) override; 45 gpu::SurfaceHandle surface_handle) override;
46 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle(
47 const gfx::GpuMemoryBufferHandle& handle,
48 const gfx::Size& size,
49 gfx::BufferFormat format) override;
50 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, 46 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer,
51 const gpu::SyncToken& sync_token) override; 47 const gpu::SyncToken& sync_token) override;
52 int counter_ = 0; 48 int counter_ = 0;
53 // TODO(sad): Explore the option of doing this from an existing thread. 49 // TODO(sad): Explore the option of doing this from an existing thread.
54 base::Thread thread_; 50 base::Thread thread_;
55 mojom::GpuPtr gpu_; 51 mojom::GpuPtr gpu_;
56 base::WeakPtr<ClientGpuMemoryBufferManager> weak_ptr_; 52 base::WeakPtr<ClientGpuMemoryBufferManager> weak_ptr_;
57 base::WeakPtrFactory<ClientGpuMemoryBufferManager> weak_ptr_factory_; 53 base::WeakPtrFactory<ClientGpuMemoryBufferManager> weak_ptr_factory_;
58 54
59 DISALLOW_COPY_AND_ASSIGN(ClientGpuMemoryBufferManager); 55 DISALLOW_COPY_AND_ASSIGN(ClientGpuMemoryBufferManager);
60 }; 56 };
61 57
62 } // namespace ui 58 } // namespace ui
63 59
64 #endif // SERVICES_UI_PUBLIC_CPP_GPU_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_ 60 #endif // SERVICES_UI_PUBLIC_CPP_GPU_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « services/ui/common/server_gpu_memory_buffer_manager.cc ('k') | services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698