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

Side by Side Diff: gpu/command_buffer/common/gpu_memory_buffer_support.h

Issue 1849313002: Pull gpu CmdBuf service/client shared GpuMemoryBuffer code to common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 8 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 2016 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 GPU_COMMAND_BUFFER_COMMON_GPU_MEMORY_BUFFER_SUPPORT_H_
6 #define GPU_COMMAND_BUFFER_COMMON_GPU_MEMORY_BUFFER_SUPPORT_H_
7
8 #include "gpu/gpu_export.h"
9 #include "ui/gfx/buffer_types.h"
10 #include "ui/gfx/geometry/size.h"
11 #include "ui/gfx/gpu_memory_buffer.h"
12
13 namespace gpu {
14
15 struct Capabilities;
16
17 // Returns a valid GpuMemoryBuffer format given a valid internalformat as
18 // defined by CHROMIUM_gpu_memory_buffer_image.
19 GPU_EXPORT gfx::BufferFormat DefaultBufferFormatForImageFormat(
20 unsigned internalformat);
21
22 // Returns true if |internalformat| is compatible with |format|.
23 GPU_EXPORT bool IsImageFormatCompatibleWithGpuMemoryBufferFormat(
24 unsigned internalformat,
25 gfx::BufferFormat format);
26
27 // Returns true if |format| is supported by |capabilities|.
28 GPU_EXPORT bool IsGpuMemoryBufferFormatSupported(
29 gfx::BufferFormat format,
30 const Capabilities& capabilities);
31
32 // Returns true if |size| is valid for |format|.
33 GPU_EXPORT bool IsImageSizeValidForGpuMemoryBufferFormat(
34 const gfx::Size& size,
35 gfx::BufferFormat format);
36
37 } // namespace gpu
38
39 #endif // GPU_COMMAND_BUFFER_COMMON_GPU_MEMORY_BUFFER_SUPPORT_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/BUILD.gn ('k') | gpu/command_buffer/common/gpu_memory_buffer_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698