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

Unified Diff: gpu/command_buffer/service/image_factory.h

Issue 988693005: Chromium roll (https://codereview.chromium.org/976353002) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fixed bad android build patch Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/gpu_tracer_unittest.cc ('k') | gpu/command_buffer/service/image_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/image_factory.h
diff --git a/gpu/command_buffer/service/image_factory.h b/gpu/command_buffer/service/image_factory.h
index 40dd15a0e611212b5f50f1e71821598b3e47199d..b5813421945636813d2e72aecb775420bfa9953e 100644
--- a/gpu/command_buffer/service/image_factory.h
+++ b/gpu/command_buffer/service/image_factory.h
@@ -15,6 +15,7 @@ class GLImage;
}
namespace gpu {
+struct Capabilities;
class GPU_EXPORT ImageFactory {
public:
@@ -35,6 +36,16 @@ class GPU_EXPORT ImageFactory {
unsigned internalformat,
gfx::GpuMemoryBuffer::Format format);
+ // Returns true if |format| is supported by |capabilities|.
+ static bool IsGpuMemoryBufferFormatSupported(
+ gfx::GpuMemoryBuffer::Format format,
+ const Capabilities& capabilities);
+
+ // Returns true if |size| is valid for |format|.
+ static bool IsImageSizeValidForGpuMemoryBufferFormat(
+ const gfx::Size& size,
+ gfx::GpuMemoryBuffer::Format format);
+
// Creates a GLImage instance for GPU memory buffer identified by |handle|.
// |client_id| should be set to the client requesting the creation of instance
// and can be used by factory implementation to verify access rights.
« no previous file with comments | « gpu/command_buffer/service/gpu_tracer_unittest.cc ('k') | gpu/command_buffer/service/image_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698