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

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

Issue 2551743002: gpu: Move native memory buffer configuration into //gpu (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
« no previous file with comments | « services/ui/common/DEPS ('k') | services/ui/common/mus_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_COMMON_MUS_GPU_MEMORY_BUFFER_MANAGER_H_ 5 #ifndef SERVICES_UI_COMMON_MUS_GPU_MEMORY_BUFFER_MANAGER_H_
6 #define SERVICES_UI_COMMON_MUS_GPU_MEMORY_BUFFER_MANAGER_H_ 6 #define SERVICES_UI_COMMON_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"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/threading/thread_checker.h" 12 #include "base/threading/thread_checker.h"
13 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" 13 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
14 #include "gpu/ipc/host/gpu_memory_buffer_support.h"
14 #include "services/ui/gpu/interfaces/gpu_service_internal.mojom.h" 15 #include "services/ui/gpu/interfaces/gpu_service_internal.mojom.h"
15 16
16 namespace ui { 17 namespace ui {
17 18
18 // This GpuMemoryBufferManager is for establishing a GpuChannelHost used by 19 // This GpuMemoryBufferManager is for establishing a GpuChannelHost used by
19 // mus locally. 20 // mus locally.
20 class MusGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager, 21 class MusGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager,
21 public base::ThreadChecker { 22 public base::ThreadChecker {
22 public: 23 public:
23 MusGpuMemoryBufferManager(mojom::GpuServiceInternal* gpu_service, 24 MusGpuMemoryBufferManager(mojom::GpuServiceInternal* gpu_service,
(...skipping 30 matching lines...) Expand all
54 private: 55 private:
55 mojom::GpuServiceInternal* gpu_service_; 56 mojom::GpuServiceInternal* gpu_service_;
56 const int client_id_; 57 const int client_id_;
57 int next_gpu_memory_id_ = 1; 58 int next_gpu_memory_id_ = 1;
58 59
59 using NativeBuffers = 60 using NativeBuffers =
60 std::unordered_set<gfx::GpuMemoryBufferId, 61 std::unordered_set<gfx::GpuMemoryBufferId,
61 BASE_HASH_NAMESPACE::hash<gfx::GpuMemoryBufferId>>; 62 BASE_HASH_NAMESPACE::hash<gfx::GpuMemoryBufferId>>;
62 std::unordered_map<int, NativeBuffers> native_buffers_; 63 std::unordered_map<int, NativeBuffers> native_buffers_;
63 64
65 const gpu::GpuMemoryBufferConfigurationSet native_configurations_;
64 base::WeakPtrFactory<MusGpuMemoryBufferManager> weak_factory_; 66 base::WeakPtrFactory<MusGpuMemoryBufferManager> weak_factory_;
65 67
66 DISALLOW_COPY_AND_ASSIGN(MusGpuMemoryBufferManager); 68 DISALLOW_COPY_AND_ASSIGN(MusGpuMemoryBufferManager);
67 }; 69 };
68 70
69 } // namespace ui 71 } // namespace ui
70 72
71 #endif // SERVICES_UI_COMMON_MUS_GPU_MEMORY_BUFFER_MANAGER_H_ 73 #endif // SERVICES_UI_COMMON_MUS_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « services/ui/common/DEPS ('k') | services/ui/common/mus_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698