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

Unified Diff: gpu/command_buffer/tests/texture_image_factory.h

Issue 2061743004: Implement native GMB backbuffers in the GLES2 Command Decoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from piman. 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/tests/texture_image_factory.h
diff --git a/gpu/command_buffer/tests/texture_image_factory.h b/gpu/command_buffer/tests/texture_image_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..3d2c1892e7e00756bffecd443620f472835bbd30
--- /dev/null
+++ b/gpu/command_buffer/tests/texture_image_factory.h
@@ -0,0 +1,32 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "gpu/command_buffer/service/image_factory.h"
+
+namespace gpu {
+
+// The images created by this factory have no inherent storage. When the image
+// is bound to a texture, storage is allocated for the texture via glTexImage2D.
+class TextureImageFactory : public gpu::ImageFactory {
+ public:
+ scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer(
+ const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ gfx::BufferFormat format,
+ unsigned internalformat,
+ int client_id) override;
+ scoped_refptr<gl::GLImage> CreateAnonymousImage(
+ const gfx::Size& size,
+ gfx::BufferFormat format,
+ unsigned internalformat) override;
+ unsigned RequiredTextureType() override;
+ bool SupportsFormatRGB() override;
+
+ void SetRequiredTextureType(unsigned type);
+
+ private:
+ unsigned required_texture_type_ = 0;
+};
+
+} // namespace gpu
« no previous file with comments | « gpu/command_buffer/tests/gl_native_gmb_backbuffer_unittest.cc ('k') | gpu/command_buffer/tests/texture_image_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698