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

Side by Side Diff: gpu/ipc/client/gpu_memory_buffer_impl.h

Issue 2042553002: Mac CoreAnimation compositor in the browser process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lock_directly
Patch Set: Created 4 years, 6 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 #ifndef GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_H_ 5 #ifndef GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_H_
6 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_H_ 6 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "gpu/command_buffer/common/sync_token.h" 12 #include "gpu/command_buffer/common/sync_token.h"
13 #include "gpu/gpu_export.h" 13 #include "gpu/gpu_export.h"
14 #include "ui/gfx/geometry/size.h" 14 #include "ui/gfx/geometry/size.h"
15 #include "ui/gfx/gpu_memory_buffer.h" 15 #include "ui/gfx/gpu_memory_buffer.h"
16 16
17 namespace gpu { 17 namespace gpu {
18 18
19 // Provides common implementation of a GPU memory buffer. 19 // Provides common implementation of a GPU memory buffer.
20 class GPU_EXPORT GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer { 20 class GPU_EXPORT GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
21 public: 21 public:
22 typedef base::Callback<void(const gpu::SyncToken& sync)> DestructionCallback; 22 typedef base::Callback<void(const gpu::SyncToken& sync)> DestructionCallback;
23 23
24 ~GpuMemoryBufferImpl() override; 24 ~GpuMemoryBufferImpl() override;
25 25
26 void* GetIOSurface() override;
27
26 // Creates an instance from the given |handle|. |size| and |internalformat| 28 // Creates an instance from the given |handle|. |size| and |internalformat|
27 // should match what was used to allocate the |handle|. |callback| is 29 // should match what was used to allocate the |handle|. |callback| is
28 // called when instance is deleted, which is not necessarily on the same 30 // called when instance is deleted, which is not necessarily on the same
29 // thread as this function was called on and instance was created on. 31 // thread as this function was called on and instance was created on.
30 static std::unique_ptr<GpuMemoryBufferImpl> CreateFromHandle( 32 static std::unique_ptr<GpuMemoryBufferImpl> CreateFromHandle(
31 const gfx::GpuMemoryBufferHandle& handle, 33 const gfx::GpuMemoryBufferHandle& handle,
32 const gfx::Size& size, 34 const gfx::Size& size,
33 gfx::BufferFormat format, 35 gfx::BufferFormat format,
34 gfx::BufferUsage usage, 36 gfx::BufferUsage usage,
35 const DestructionCallback& callback); 37 const DestructionCallback& callback);
(...skipping 24 matching lines...) Expand all
60 bool mapped_; 62 bool mapped_;
61 gpu::SyncToken destruction_sync_token_; 63 gpu::SyncToken destruction_sync_token_;
62 64
63 private: 65 private:
64 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImpl); 66 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImpl);
65 }; 67 };
66 68
67 } // namespace gpu 69 } // namespace gpu
68 70
69 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_H_ 71 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/compositor/gpu_output_surface_mac.mm ('k') | gpu/ipc/client/gpu_memory_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698