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

Side by Side Diff: content/common/gpu/client/gpu_memory_buffer_factory_host.h

Issue 1189943002: content: Fix lost context handling when using native GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: retry logic and remove singleton Created 5 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
(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 CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_FACTORY_HOST_H_
6 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_FACTORY_HOST_H_
7
8 #include "base/callback.h"
9 #include "content/common/content_export.h"
10 #include "ui/gfx/gpu_memory_buffer.h"
11
12 namespace gfx {
13 class Size;
14 }
15
16 namespace content {
17
18 class CONTENT_EXPORT GpuMemoryBufferFactoryHost {
19 public:
20 typedef base::Callback<void(const gfx::GpuMemoryBufferHandle& handle)>
21 CreateGpuMemoryBufferCallback;
22
23 virtual bool IsGpuMemoryBufferConfigurationSupported(
24 gfx::GpuMemoryBuffer::Format format,
25 gfx::GpuMemoryBuffer::Usage usage) = 0;
26 virtual void CreateGpuMemoryBuffer(
27 gfx::GpuMemoryBufferId id,
28 const gfx::Size& size,
29 gfx::GpuMemoryBuffer::Format format,
30 gfx::GpuMemoryBuffer::Usage usage,
31 int client_id,
32 int32 surface_id,
33 const CreateGpuMemoryBufferCallback& callback) = 0;
34 virtual void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
35 int client_id,
36 int32 sync_point) = 0;
37
38 protected:
39 virtual ~GpuMemoryBufferFactoryHost() {}
40 };
41
42 } // namespace content
43
44 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_FACTORY_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698