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

Side by Side Diff: content/browser/gpu/gpu_process_host.cc

Issue 1269503007: Unify graphics buffer format & usage enums for GpuMemoryBuffer & SurfaceFactoryOzone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add header to BUILD.gn Created 5 years, 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/gpu/gpu_process_host.h" 5 #include "content/browser/gpu/gpu_process_host.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 } else { 686 } else {
687 // Could distinguish here between compositing_surface being NULL 687 // Could distinguish here between compositing_surface being NULL
688 // and Send failing, if desired. 688 // and Send failing, if desired.
689 callback.Run(CREATE_COMMAND_BUFFER_FAILED_AND_CHANNEL_LOST); 689 callback.Run(CREATE_COMMAND_BUFFER_FAILED_AND_CHANNEL_LOST);
690 } 690 }
691 } 691 }
692 692
693 void GpuProcessHost::CreateGpuMemoryBuffer( 693 void GpuProcessHost::CreateGpuMemoryBuffer(
694 gfx::GpuMemoryBufferId id, 694 gfx::GpuMemoryBufferId id,
695 const gfx::Size& size, 695 const gfx::Size& size,
696 gfx::GpuMemoryBuffer::Format format, 696 gfx::BufferFormat format,
697 gfx::GpuMemoryBuffer::Usage usage, 697 gfx::BufferUsage usage,
698 int client_id, 698 int client_id,
699 int32 surface_id, 699 int32 surface_id,
700 const CreateGpuMemoryBufferCallback& callback) { 700 const CreateGpuMemoryBufferCallback& callback) {
701 TRACE_EVENT0("gpu", "GpuProcessHost::CreateGpuMemoryBuffer"); 701 TRACE_EVENT0("gpu", "GpuProcessHost::CreateGpuMemoryBuffer");
702 702
703 DCHECK(CalledOnValidThread()); 703 DCHECK(CalledOnValidThread());
704 704
705 GpuMsg_CreateGpuMemoryBuffer_Params params; 705 GpuMsg_CreateGpuMemoryBuffer_Params params;
706 params.id = id; 706 params.id = id;
707 params.size = size; 707 params.size = size;
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1145 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1146 ClientIdToShaderCacheMap::iterator iter = 1146 ClientIdToShaderCacheMap::iterator iter =
1147 client_id_to_shader_cache_.find(client_id); 1147 client_id_to_shader_cache_.find(client_id);
1148 // If the cache doesn't exist then this is an off the record profile. 1148 // If the cache doesn't exist then this is an off the record profile.
1149 if (iter == client_id_to_shader_cache_.end()) 1149 if (iter == client_id_to_shader_cache_.end())
1150 return; 1150 return;
1151 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); 1151 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader);
1152 } 1152 }
1153 1153
1154 } // namespace content 1154 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | content/browser/renderer_host/media/video_capture_buffer_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698