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

Side by Side Diff: content/browser/gpu/browser_gpu_memory_buffer_manager.h

Issue 1421293006: Mac: Use GpuMemoryBuffers by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable when native GMBs are disabled Created 5 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
« no previous file with comments | « no previous file | content/browser/gpu/browser_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 CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_
6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ 6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 using CreateCallback = 44 using CreateCallback =
45 base::Callback<void(const gfx::GpuMemoryBufferHandle& handle)>; 45 base::Callback<void(const gfx::GpuMemoryBufferHandle& handle)>;
46 using AllocationCallback = CreateCallback; 46 using AllocationCallback = CreateCallback;
47 47
48 BrowserGpuMemoryBufferManager(int gpu_client_id, 48 BrowserGpuMemoryBufferManager(int gpu_client_id,
49 uint64_t gpu_client_tracing_id); 49 uint64_t gpu_client_tracing_id);
50 ~BrowserGpuMemoryBufferManager() override; 50 ~BrowserGpuMemoryBufferManager() override;
51 51
52 static BrowserGpuMemoryBufferManager* current(); 52 static BrowserGpuMemoryBufferManager* current();
53 53
54 static bool IsNativeGpuMemoryBuffersEnabled();
55
54 static uint32 GetImageTextureTarget(gfx::BufferFormat format, 56 static uint32 GetImageTextureTarget(gfx::BufferFormat format,
55 gfx::BufferUsage usage); 57 gfx::BufferUsage usage);
56 58
57 // Overridden from gpu::GpuMemoryBufferManager: 59 // Overridden from gpu::GpuMemoryBufferManager:
58 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( 60 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
59 const gfx::Size& size, 61 const gfx::Size& size,
60 gfx::BufferFormat format, 62 gfx::BufferFormat format,
61 gfx::BufferUsage usage) override; 63 gfx::BufferUsage usage) override;
62 scoped_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( 64 scoped_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle(
63 const gfx::GpuMemoryBufferHandle& handle, 65 const gfx::GpuMemoryBufferHandle& handle,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>; 182 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>;
181 using ClientMap = base::hash_map<int, BufferMap>; 183 using ClientMap = base::hash_map<int, BufferMap>;
182 ClientMap clients_; 184 ClientMap clients_;
183 185
184 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); 186 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager);
185 }; 187 };
186 188
187 } // namespace content 189 } // namespace content
188 190
189 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ 191 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698