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

Side by Side Diff: content/common/gpu/gpu_memory_buffer_factory_io_surface.cc

Issue 1251783002: Mac Overlays: Wire up overlays on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@part22
Patch Set: Add more dchecks Created 5 years, 5 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 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 #include "content/common/gpu/gpu_memory_buffer_factory_io_surface.h" 5 #include "content/common/gpu/gpu_memory_buffer_factory_io_surface.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h> 7 #include <CoreFoundation/CoreFoundation.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 case gfx::GpuMemoryBuffer::YUV_420: 63 case gfx::GpuMemoryBuffer::YUV_420:
64 NOTREACHED(); 64 NOTREACHED();
65 return 0; 65 return 0;
66 } 66 }
67 67
68 NOTREACHED(); 68 NOTREACHED();
69 return 0; 69 return 0;
70 } 70 }
71 71
72 const GpuMemoryBufferFactory::Configuration kSupportedConfigurations[] = { 72 const GpuMemoryBufferFactory::Configuration kSupportedConfigurations[] = {
73 {gfx::GpuMemoryBuffer::BGRA_8888, gfx::GpuMemoryBuffer::SCANOUT},
73 {gfx::GpuMemoryBuffer::R_8, gfx::GpuMemoryBuffer::PERSISTENT_MAP}, 74 {gfx::GpuMemoryBuffer::R_8, gfx::GpuMemoryBuffer::PERSISTENT_MAP},
74 {gfx::GpuMemoryBuffer::R_8, gfx::GpuMemoryBuffer::MAP}, 75 {gfx::GpuMemoryBuffer::R_8, gfx::GpuMemoryBuffer::MAP},
75 {gfx::GpuMemoryBuffer::BGRA_8888, gfx::GpuMemoryBuffer::PERSISTENT_MAP}, 76 {gfx::GpuMemoryBuffer::BGRA_8888, gfx::GpuMemoryBuffer::PERSISTENT_MAP},
76 {gfx::GpuMemoryBuffer::BGRA_8888, gfx::GpuMemoryBuffer::MAP}}; 77 {gfx::GpuMemoryBuffer::BGRA_8888, gfx::GpuMemoryBuffer::MAP}};
77 78
78 } // namespace 79 } // namespace
79 80
80 GpuMemoryBufferFactoryIOSurface::GpuMemoryBufferFactoryIOSurface() { 81 GpuMemoryBufferFactoryIOSurface::GpuMemoryBufferFactoryIOSurface() {
81 } 82 }
82 83
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 179
179 scoped_refptr<gfx::GLImageIOSurface> image( 180 scoped_refptr<gfx::GLImageIOSurface> image(
180 new gfx::GLImageIOSurface(size, internalformat)); 181 new gfx::GLImageIOSurface(size, internalformat));
181 if (!image->Initialize(it->second.get(), format)) 182 if (!image->Initialize(it->second.get(), format))
182 return scoped_refptr<gfx::GLImage>(); 183 return scoped_refptr<gfx::GLImage>();
183 184
184 return image; 185 return image;
185 } 186 }
186 187
187 } // namespace content 188 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698