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

Side by Side Diff: content/common/gpu/gpu_channel.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
« no previous file with comments | « content/common/gpu/gpu_channel.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('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 (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 #if defined(OS_WIN) 5 #if defined(OS_WIN)
6 #include <windows.h> 6 #include <windows.h>
7 #endif 7 #endif
8 8
9 #include "content/common/gpu/gpu_channel.h" 9 #include "content/common/gpu/gpu_channel.h"
10 10
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 size += gpu_channel_manager()->gpu_memory_manager()->GetTrackerMemoryUsage( 859 size += gpu_channel_manager()->gpu_memory_manager()->GetTrackerMemoryUsage(
860 tracker); 860 tracker);
861 } 861 }
862 862
863 return size; 863 return size;
864 } 864 }
865 865
866 scoped_refptr<gfx::GLImage> GpuChannel::CreateImageForGpuMemoryBuffer( 866 scoped_refptr<gfx::GLImage> GpuChannel::CreateImageForGpuMemoryBuffer(
867 const gfx::GpuMemoryBufferHandle& handle, 867 const gfx::GpuMemoryBufferHandle& handle,
868 const gfx::Size& size, 868 const gfx::Size& size,
869 gfx::GpuMemoryBuffer::Format format, 869 gfx::BufferFormat format,
870 uint32 internalformat) { 870 uint32 internalformat) {
871 switch (handle.type) { 871 switch (handle.type) {
872 case gfx::SHARED_MEMORY_BUFFER: { 872 case gfx::SHARED_MEMORY_BUFFER: {
873 scoped_refptr<gfx::GLImageSharedMemory> image( 873 scoped_refptr<gfx::GLImageSharedMemory> image(
874 new gfx::GLImageSharedMemory(size, internalformat)); 874 new gfx::GLImageSharedMemory(size, internalformat));
875 if (!image->Initialize(handle, format)) 875 if (!image->Initialize(handle, format))
876 return scoped_refptr<gfx::GLImage>(); 876 return scoped_refptr<gfx::GLImage>();
877 877
878 return image; 878 return image;
879 } 879 }
(...skipping 26 matching lines...) Expand all
906 pmd->CreateAllocatorDump(base::StringPrintf("gl/%s", dump_name.c_str())); 906 pmd->CreateAllocatorDump(base::StringPrintf("gl/%s", dump_name.c_str()));
907 907
908 dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, 908 dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
909 base::trace_event::MemoryAllocatorDump::kUnitsBytes, 909 base::trace_event::MemoryAllocatorDump::kUnitsBytes,
910 GetMemoryUsage()); 910 GetMemoryUsage());
911 911
912 return true; 912 return true;
913 } 913 }
914 914
915 } // namespace content 915 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698