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

Unified Diff: content/browser/gpu/browser_gpu_memory_buffer_manager.cc

Issue 2963813002: gpu: Use a local int to generate the gmb id. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gpu/browser_gpu_memory_buffer_manager.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/browser_gpu_memory_buffer_manager.cc
diff --git a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
index 9db43c78485cbadc0969a25a56f7826903bf88fa..93310633ae2c0fe5da07cbe272140910ac0178e1 100644
--- a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
+++ b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
@@ -17,13 +17,10 @@
#include "build/build_config.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/common/child_process_host_impl.h"
-#include "content/common/generic_shared_memory_id_generator.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h"
-#include "gpu/GLES2/gl2extchromium.h"
#include "gpu/ipc/client/gpu_memory_buffer_impl.h"
#include "gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h"
-#include "gpu/ipc/common/gpu_memory_buffer_support.h"
#include "ui/gfx/buffer_format_util.h"
#include "ui/gfx/gpu_memory_buffer_tracing.h"
#include "ui/gl/gl_switches.h"
@@ -262,8 +259,7 @@ void BrowserGpuMemoryBufferManager::HandleCreateGpuMemoryBufferOnIO(
CreateGpuMemoryBufferRequest* request) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- gfx::GpuMemoryBufferId new_id = content::GetNextGenericSharedMemoryId();
-
+ gfx::GpuMemoryBufferId new_id(next_gpu_memory_id_++);
// Use service side allocation for native configurations.
if (IsNativeGpuMemoryBufferConfiguration(request->format, request->usage)) {
// Note: Unretained is safe as this is only used for synchronous allocation
« no previous file with comments | « content/browser/gpu/browser_gpu_memory_buffer_manager.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698