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

Side by Side Diff: cc/resources/gpu_memory_buffer_manager.h

Issue 634083002: gpu: Compositor management of GpuMemoryBuffer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cc-pre-chromium-image-refactor
Patch Set: some build fixes Created 6 years, 2 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_RESOURCES_GPU_MEMORY_BUFFER_MANAGER_H_
6 #define CC_RESOURCES_GPU_MEMORY_BUFFER_MANAGER_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "ui/gfx/gpu_memory_buffer.h"
10 #include "ui/gfx/size.h"
11
12 namespace cc {
13
14 class GpuMemoryBufferManager {
15 public:
16 // Allocates a GpuMemoryBuffer that can be shared with another process.
17 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
18 const gfx::Size& size,
19 gfx::GpuMemoryBuffer::Format format,
20 gfx::GpuMemoryBuffer::Usage usage) = 0;
21
22 // Returns a GpuMemoryBuffer instance given a ClientBuffer. Returns NULL on
23 // failure.
24 virtual gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer(
25 ClientBuffer buffer) = 0;
26
27 protected:
28 virtual ~GpuMemoryBufferManager() {}
29 };
30
31 } // namespace cc
32
33 #endif // CC_RESOURCES_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698