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

Side by Side Diff: content/common/gpu/client/gpu_memory_buffer_impl_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: Leave widget type unchanged 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/client/gpu_memory_buffer_impl_io_surface.h" 5 #include "content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/common/mac/io_surface_manager.h" 8 #include "content/common/mac/io_surface_manager.h"
9 9
10 namespace content { 10 namespace content {
11 namespace { 11 namespace {
12 12
13 uint32_t LockFlags(gfx::GpuMemoryBuffer::Usage usage) { 13 uint32_t LockFlags(gfx::GpuMemoryBuffer::Usage usage) {
14 switch (usage) { 14 switch (usage) {
15 case gfx::GpuMemoryBuffer::MAP: 15 case gfx::GpuMemoryBuffer::MAP:
16 return kIOSurfaceLockAvoidSync; 16 return kIOSurfaceLockAvoidSync;
17 case gfx::GpuMemoryBuffer::PERSISTENT_MAP: 17 case gfx::GpuMemoryBuffer::PERSISTENT_MAP:
18 return 0; 18 return 0;
19 case gfx::GpuMemoryBuffer::SCANOUT: 19 case gfx::GpuMemoryBuffer::SCANOUT:
20 NOTREACHED();
21 return 0; 20 return 0;
22 } 21 }
23 NOTREACHED(); 22 NOTREACHED();
24 return 0; 23 return 0;
25 } 24 }
26 25
27 } // namespace 26 } // namespace
28 27
29 GpuMemoryBufferImplIOSurface::GpuMemoryBufferImplIOSurface( 28 GpuMemoryBufferImplIOSurface::GpuMemoryBufferImplIOSurface(
30 gfx::GpuMemoryBufferId id, 29 gfx::GpuMemoryBufferId id,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 77 }
79 78
80 gfx::GpuMemoryBufferHandle GpuMemoryBufferImplIOSurface::GetHandle() const { 79 gfx::GpuMemoryBufferHandle GpuMemoryBufferImplIOSurface::GetHandle() const {
81 gfx::GpuMemoryBufferHandle handle; 80 gfx::GpuMemoryBufferHandle handle;
82 handle.type = gfx::IO_SURFACE_BUFFER; 81 handle.type = gfx::IO_SURFACE_BUFFER;
83 handle.id = id_; 82 handle.id = id_;
84 return handle; 83 return handle;
85 } 84 }
86 85
87 } // namespace content 86 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/browser_gpu_memory_buffer_manager.cc ('k') | content/common/gpu/gpu_memory_buffer_factory_io_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698