diff options
author | Gunnar Sletta <gunnar@sletta.org> | 2015-06-11 10:17:45 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-06-15 09:31:08 +0000 |
commit | e9c5ac78deaae6775ad5cf08c022a0105f7702a7 (patch) | |
tree | 8eca91f4d1dc1c13f07f96369023e42b65bbcded /src/quick/scenegraph/util/qsgengine.h | |
parent | d845227aca013f9d3c0d63a394a5c27733f6d019 (diff) |
Add QQuickWindow::TextureIsOpaque as option to createTextureFromImage.
Opaque textures can be a lot faster, so give this option without
forcing the user to reimplement her/his own QSGTexture class.
The old behavior was that createTextureFromImage() disregarded
TextureHasAlphaChannel and looked solely at the image's format. To
keep this behavior intact, we introduce a second opt-in flag to switch
textures from auto-detect to false, namely TextureIsOpaque.
[ChangeLog][QtQuick][QQuickWindow] Add TextureIsOpaque option to
createTextureFromImage()
Change-Id: I248db4bc5f7920864b6aa8d831ce24d23ad370ef
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/quick/scenegraph/util/qsgengine.h')
-rw-r--r-- | src/quick/scenegraph/util/qsgengine.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/scenegraph/util/qsgengine.h b/src/quick/scenegraph/util/qsgengine.h index 9a74a02aa1..325d3a9ca2 100644 --- a/src/quick/scenegraph/util/qsgengine.h +++ b/src/quick/scenegraph/util/qsgengine.h @@ -52,7 +52,8 @@ public: enum CreateTextureOption { TextureHasAlphaChannel = 0x0001, TextureOwnsGLTexture = 0x0004, - TextureCanUseAtlas = 0x0008 + TextureCanUseAtlas = 0x0008, + TextureIsOpaque = 0x0010 }; Q_DECLARE_FLAGS(CreateTextureOptions, CreateTextureOption) |