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

Side by Side Diff: cc/test/test_gpu_memory_buffer_manager.h

Issue 2087673002: Remove CreateGpuMemoryBufferFromClientId and plumbing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 months 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 | « cc/resources/video_resource_updater.cc ('k') | cc/test/test_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CC_TEST_TEST_GPU_MEMORY_BUFFER_MANAGER_H_ 5 #ifndef CC_TEST_TEST_GPU_MEMORY_BUFFER_MANAGER_H_
6 #define CC_TEST_TEST_GPU_MEMORY_BUFFER_MANAGER_H_ 6 #define CC_TEST_TEST_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 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromClientId(
41 int client_id,
42 const gfx::GpuMemoryBufferId& gpu_memory_buffer_id) override;
43 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer( 40 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer(
44 ClientBuffer buffer) override; 41 ClientBuffer buffer) override;
45 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, 42 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer,
46 const gpu::SyncToken& sync_token) override; 43 const gpu::SyncToken& sync_token) override;
47 44
48 private: 45 private:
49 // Buffers allocated by this manager. 46 // Buffers allocated by this manager.
50 int last_gpu_memory_buffer_id_ = 1000; 47 int last_gpu_memory_buffer_id_ = 1000;
51 std::map<int, gfx::GpuMemoryBuffer*> buffers_; 48 std::map<int, gfx::GpuMemoryBuffer*> buffers_;
52 49
53 // Parent information for child managers. 50 // Parent information for child managers.
54 int client_id_ = -1; 51 int client_id_ = -1;
55 TestGpuMemoryBufferManager* parent_gpu_memory_buffer_manager_ = nullptr; 52 TestGpuMemoryBufferManager* parent_gpu_memory_buffer_manager_ = nullptr;
56 53
57 // Child infomration for parent managers. 54 // Child infomration for parent managers.
58 int last_client_id_ = 5000; 55 int last_client_id_ = 5000;
59 std::map<int, TestGpuMemoryBufferManager*> clients_; 56 std::map<int, TestGpuMemoryBufferManager*> clients_;
60 57
61 DISALLOW_COPY_AND_ASSIGN(TestGpuMemoryBufferManager); 58 DISALLOW_COPY_AND_ASSIGN(TestGpuMemoryBufferManager);
62 }; 59 };
63 60
64 } // namespace cc 61 } // namespace cc
65 62
66 #endif // CC_TEST_TEST_GPU_MEMORY_BUFFER_MANAGER_H_ 63 #endif // CC_TEST_TEST_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/resources/video_resource_updater.cc ('k') | cc/test/test_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698