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

Side by Side Diff: content/common/gpu/client/gpu_memory_buffer_impl.cc

Issue 699073004: content: Add command line flag for native GPU memory buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gpu-memory-buffer-impl-unittests
Patch Set: fix unit test failures on macosx Created 6 years 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.h" 5 #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h" 8 #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h"
9 #include "ui/gl/gl_bindings.h" 9 #include "ui/gl/gl_bindings.h"
10 10
11 #if defined(OS_MACOSX) 11 #if defined(OS_MACOSX)
12 #include "content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h" 12 #include "content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h"
13 #endif 13 #endif
14 14
15 #if defined(OS_ANDROID) 15 #if defined(OS_ANDROID)
16 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h" 16 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h"
17 #endif 17 #endif
18 18
19 #if defined(USE_OZONE) 19 #if defined(USE_OZONE)
20 #include "content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h " 20 #include "content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h "
21 #endif 21 #endif
22 22
23 namespace content { 23 namespace content {
24 24
25
26 GpuMemoryBufferImpl::GpuMemoryBufferImpl(gfx::GpuMemoryBufferId id, 25 GpuMemoryBufferImpl::GpuMemoryBufferImpl(gfx::GpuMemoryBufferId id,
27 const gfx::Size& size, 26 const gfx::Size& size,
28 Format format, 27 Format format,
29 const DestructionCallback& callback) 28 const DestructionCallback& callback)
30 : id_(id), 29 : id_(id),
31 size_(size), 30 size_(size),
32 format_(format), 31 format_(format),
33 callback_(callback), 32 callback_(callback),
34 mapped_(false), 33 mapped_(false),
35 destruction_sync_point_(0) { 34 destruction_sync_point_(0) {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 94
96 bool GpuMemoryBufferImpl::IsMapped() const { 95 bool GpuMemoryBufferImpl::IsMapped() const {
97 return mapped_; 96 return mapped_;
98 } 97 }
99 98
100 ClientBuffer GpuMemoryBufferImpl::AsClientBuffer() { 99 ClientBuffer GpuMemoryBufferImpl::AsClientBuffer() {
101 return reinterpret_cast<ClientBuffer>(this); 100 return reinterpret_cast<ClientBuffer>(this);
102 } 101 }
103 102
104 } // namespace content 103 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698