| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
- Don't use toImage() / fromImage() to copy when a render FBO is active.
- Use raster for rendering to small (< 32x32) pixmaps.
Reviewed-by: Trond
|
|
|
|
|
|
|
| |
We don't want to do the opaque image scan when the Qt::NoOpaqueDetection
flag is set.
Reviewed-by: Trond
|
|
|
|
|
|
| |
Got rid of an ugly switch statement.
Reviewed-by: Tom
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a lot of code depending on that pixmaps are flipped
upside down in the gl graphicssystem, so toggling this requires
extensive testing. Since we're anyway questioning the relevance
of this feature (compared to raster + GL viewport) its simply not
worth the effort to fix it properly right now.
Revert "Fixed y-inverted pixmaps on N900."
This reverts commit 57473d5d2a7bd6ae3117f61ff29264a1b790bb01.
|
|
|
|
|
|
|
|
|
|
|
| |
The QGLPixmapData used default bind options, which means
that the pixmap is always flipped up-side-down and
rendered with flipping. The opaque pixmaps were
uploaded unflipped which caused the bug. Ideally we do not
want pixmap flipping so change the default in gl pixmaps and
tag it accordingly.
Reviewed-by: Samuel
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
|
| |
Previous code was aligning lines on a 3-byte boundary.
Task-number: QTBUG-6902
Reviewed-by: Julian de Bhal
|
|
|
|
| |
Reviewed-by: trustme
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The QGLContext::bindTexture(QString) function has been augmented
with support for ETC1, PVRTC2, and PVRTC4 compressed textures,
in addition to the existing DDS support.
The QGLPixmapData class has also been modified to recognize
compressed texture formats in fromFile() and fromData().
This change also fixes a bug in bindTexture() that prevented
the same compressed texture file from being bound in multiple
contexts. There is now a separate file cache for each context group.
Task-number: QT-2547
Reviewed-by: Trond
|
|
|
|
|
|
|
| |
The format and internal_format parameters to glTexImage2D need to always
match on OpenGL ES 2.0.
Reviewed-by: Tom Cooksey
|
|
|
|
|
|
|
|
|
|
| |
QPaintDevice and QImage used the functions numColors(), setNumColors(),
and numBytes(). However, this is not consistent with the rest of the Qt
API which uses *Count() and set*Count().
Removed all usage of these functions inside Qt and test-cases.
Reviewed-by: Andreas Aardal Hanssen
|
|
|
|
|
|
|
| |
The strict size parameter can be used when it's critical that we get the
exact size we ask for.
Reviewed-by: Gunnar Sletta
|
|
|
|
|
|
| |
This improves performance on certain OpenGL ES 2.0 platforms.
Reviewed-by: Gunnar Sletta
|
|
|
|
|
|
|
|
|
| |
When QGLPixmapData is bound after a fill(), without being painted on in
the mean-time, it's cheaper to directly generate a source image than to
go through convertToGLFormat(), since all the pixels in the image will
have the same value.
Reviewed-by: Trond
|
|
|
|
|
|
| |
Fixes test failures in fill() and setGetMask().
Reviewed-by: Trond
|
|
|
|
|
|
| |
QPixmap::copy() now returns a pixmap with the same pixmap backend.
Reviewed-by: Gunnar Sletta
|
|
|
|
| |
Reviewed-by: Markus Goetz
|
|\ |
|
| |
| |
| |
| | |
Reviewed-by: Samuel
|
|/
|
|
| |
Reviewed-by: Samuel
|
|
|
|
| |
Reviewed-by: Samuel
|
|
|
|
|
|
|
| |
Since copyBackFromRenderFbo() manually changes the framebuffer object
binding, we also need to update the context's current_fbo member.
Reviewed-by: Kim
|
|
|
|
|
|
|
| |
The defines are GL_MODELVIEW/GL_PROJECTION, not GL_MODELVIEW_MATRIX/etc.
The _MATRIX defines are for fetching the matrix, not setting it.
Reviewed-by: trustme
|
|
|
|
|
|
| |
Matrix functions do not exist under OpenGL/ES 2.0.
Reviewed-by: trustme
|
|
|
|
|
|
|
| |
Slightly increase threshold for when to shrink an FBO, and reduce the
number of calls to glBindFramebuffer.
Reviewed-by: Tom
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Need to transfer to brush drawing mode when switching active engine,
to make sure we reset the vertex / texture coordinate pointers for image
drawing.
2) QGLPixmapGLPaintDevice::beginPaint() was changed to use
QGLContext::drawTexture() for blitting the old texture contents to the
render FBO, which means that we also need to set up viewport, modelview,
and projection matrices, and ensure that clipping / stencil testing
is disabled.
3) Make sure stencil testing is disabled when clearing the FBO.
Reviewed-by: Tom
|
|
|
|
|
|
|
|
|
|
|
|
| |
It should be up to QGLPaintDevice::beginPaint() to make the correct
context current, so everything needing a current context needs to be
moved after that call.
This patch also modifies QGLPixmapData to use QGLContext::drawTexture
rather than the GL2 PE's drawTexture, which shouldn't be called inside
beginPaint as the paint engine hasn't been fully initialised yet.
Reviewed-by: Eskil
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
|
|
|
|
| |
This patch changes the ordering of QGL2PaintEngine::begin a bit because
QGLPixmapData needs to use the paint engine's drawTexture method within
beginPaint().
Also, this initialises needsSync to true and removes the setState call.
So now all the state initialisation is done in ensureActive rather than
begin.
|
|
|
|
| |
Reviewed-by: Sarah Smith
|
|
|
|
|
|
|
| |
Renaming setInternalFormat() to setInternalTextureFormat() (and
similarly for the accessor) makes the API a bit more explicit.
Reviewed-by: Trond
|
|
|
|
|
|
|
|
|
|
| |
The type of GLenum was changed between 10.4 and 10.5, so to support
compiling on one and deploying on the other we need this hack. Also
get rid of the complex QGLFramebufferObjectFormat constructor in
favor of a simple default constructor and setters, which is more
Qt-ish anyway, and avoids ambiguities on mac.
Reviewed-by: Trond
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
demos/boxes/glshaders.cpp
demos/boxes/vector.h
demos/embedded/fluidlauncher/pictureflow.cpp
demos/embedded/fluidlauncher/pictureflow.h
doc/src/desktop-integration.qdoc
doc/src/distributingqt.qdoc
doc/src/examples-overview.qdoc
doc/src/examples.qdoc
doc/src/frameworks-technologies/dbus-adaptors.qdoc
doc/src/geometry.qdoc
doc/src/groups.qdoc
doc/src/objecttrees.qdoc
doc/src/platform-notes.qdoc
doc/src/plugins-howto.qdoc
doc/src/qt3support.qdoc
doc/src/qtdbus.qdoc
doc/src/qtdesigner.qdoc
doc/src/qtgui.qdoc
doc/src/qtmain.qdoc
doc/src/qtopengl.qdoc
doc/src/qtsvg.qdoc
doc/src/qtuiloader.qdoc
doc/src/qundo.qdoc
doc/src/richtext.qdoc
doc/src/topics.qdoc
src/corelib/tools/qdumper.cpp
src/gui/embedded/qkbdpc101_qws.cpp
src/gui/embedded/qkbdsl5000_qws.cpp
src/gui/embedded/qkbdusb_qws.cpp
src/gui/embedded/qkbdvr41xx_qws.cpp
src/gui/embedded/qkbdyopy_qws.cpp
src/gui/embedded/qmousebus_qws.cpp
src/gui/embedded/qmousevr41xx_qws.cpp
src/gui/embedded/qmouseyopy_qws.cpp
src/gui/painting/qpaintengine_d3d.cpp
src/gui/painting/qwindowsurface_d3d.cpp
src/opengl/gl2paintengineex/glgc_shader_source.h
src/opengl/gl2paintengineex/qglpexshadermanager.cpp
src/opengl/gl2paintengineex/qglpexshadermanager_p.h
src/opengl/gl2paintengineex/qglshader.cpp
src/opengl/gl2paintengineex/qglshader_p.h
src/opengl/util/fragmentprograms_p.h
src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp
src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp
src/script/parser/qscript.g
src/script/qscriptarray_p.h
src/script/qscriptasm_p.h
src/script/qscriptbuffer_p.h
src/script/qscriptclass.cpp
src/script/qscriptclassdata_p.h
src/script/qscriptcompiler.cpp
src/script/qscriptcompiler_p.h
src/script/qscriptcontext.cpp
src/script/qscriptcontext_p.cpp
src/script/qscriptcontext_p.h
src/script/qscriptcontextfwd_p.h
src/script/qscriptecmaarray.cpp
src/script/qscriptecmaarray_p.h
src/script/qscriptecmaboolean.cpp
src/script/qscriptecmacore.cpp
src/script/qscriptecmadate.cpp
src/script/qscriptecmadate_p.h
src/script/qscriptecmaerror.cpp
src/script/qscriptecmaerror_p.h
src/script/qscriptecmafunction.cpp
src/script/qscriptecmafunction_p.h
src/script/qscriptecmaglobal.cpp
src/script/qscriptecmaglobal_p.h
src/script/qscriptecmamath.cpp
src/script/qscriptecmamath_p.h
src/script/qscriptecmanumber.cpp
src/script/qscriptecmanumber_p.h
src/script/qscriptecmaobject.cpp
src/script/qscriptecmaobject_p.h
src/script/qscriptecmaregexp.cpp
src/script/qscriptecmaregexp_p.h
src/script/qscriptecmastring.cpp
src/script/qscriptecmastring_p.h
src/script/qscriptengine.cpp
src/script/qscriptengine_p.cpp
src/script/qscriptengine_p.h
src/script/qscriptenginefwd_p.h
src/script/qscriptextenumeration.cpp
src/script/qscriptextenumeration_p.h
src/script/qscriptextqobject.cpp
src/script/qscriptextqobject_p.h
src/script/qscriptextvariant.cpp
src/script/qscriptfunction.cpp
src/script/qscriptfunction_p.h
src/script/qscriptgc_p.h
src/script/qscriptmember_p.h
src/script/qscriptobject_p.h
src/script/qscriptprettypretty.cpp
src/script/qscriptprettypretty_p.h
src/script/qscriptvalue.cpp
src/script/qscriptvalueimpl.cpp
src/script/qscriptvalueimpl_p.h
src/script/qscriptvalueimplfwd_p.h
src/script/qscriptvalueiteratorimpl.cpp
src/script/qscriptxmlgenerator.cpp
src/script/qscriptxmlgenerator_p.h
tests/auto/linguist/lupdate/testdata/recursivescan/project.ui
tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp
tests/auto/qkeyevent/tst_qkeyevent.cpp
tools/linguist/shared/cpp.cpp
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|
| |
| |
| |
| | |
Reviewed-by: trustme
|
| |
| |
| |
| |
| |
| |
| | |
and y-axis inversion and overall less conversion, making significantly faster
for plain usecases
Reviewed-by: Trond
|
| |
| |
| |
| | |
Reviewed-by: Tom
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Reviewed-by: Trust Me
|
| | | |
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/opengl/gl2paintengineex/qglengineshadermanager.cpp
src/opengl/gl2paintengineex/qglengineshadermanager_p.h
src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
Merge custom shader / GL blur pixmap filter implementation from graphics
team repo with implementation from kinetic graphics-team repo.
|
| | |
| | |
| | |
| | |
| | | |
The FBO pool will be useful in other places as well, plus it makes it
easier to deal with graphics memory management issues.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The patch tries to use texture_from_pixmap extentions on glX to properly
bind an X Pixmap to a texture in QGLContextPrivate::bindTexture(QPixmap,).
Because GL & X have different coordinate systems, the pixmap will be
inverted about the y-axis. The extension does however allow a
GLX_Y_INVERTED_EXT attribute to be set which will bind the pixmap the
correct way up. If the underlying driver doesn't support this,
texture_from_pixmap can't be used for QGLContext::bindTexture, because
that function expects the resulting texture to be the right way up.
However, it can still be used internally by the paint engine for
drawPixmap operations. For these cases, if the pixmap is inverted, the
paint engine can simply invert the texture coords to compensate. This is
why this patch also moves QGLTexture into qgl_p.h.
QGLContextPrivate::bindTexture(QPixmap,) now returns a QGLTexture which
the paint engine can inspect to see if it needs to invert the texture
coords.
Finally, it seems on some (probably all) drivers, deleting an X pixmap
which has been bound to a texture before calling glFinish/swapBuffers
renders garbage. Presumably this is because X deletes the pixmap behind
the driver's back before it's had a chance to use it. To fix this, we
reference all QPixmaps which have been bound to stop them being deleted
and only deref them after we swap the buffer, when they can be safely
deleted.
Reviewed-By: Kim
|
|/ /
| |
| |
| |
| | |
When an extern function is declared in the scope of another function,
MSVC sometimes ignores the enclosing namespace {}.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure a QPixmap gets an alpha channel when filled with a non-opaque
color, and fix issues where shader manager did not active correct shader
program.
Reviewed-by: Tom
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change moves the w, h, d variables to QPixmapData and introduces
is_null to keep track of nullness. This is possible only because
QPixmapData is internal API; otherwise we'd have to be smarter.
The optimization makes the QPixmap::width() function take 7 instructions,
down from 34 before. For the calculator demo in the declarative ui branch
this reduces a block of 750000 instructions (out of 30000000) to around
100000-150000 instructions.
Tested on Windows, Linux, Mac. Raster, X11 and OpenGL paint engines. Have
not tested the DirectFB engine.
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If creating a QGLWidget triggers the creation of a QPixmap then we might
end up in an infinite recursion due to QPixmap trying to access
qt_gl_share_widget(). This can happen via setWindowIcon for example.
Adding an initializing flag to QGLGlobalShareWidget and preventing
QGLFramebufferObject::hasOpenGLFramebufferObjects() and
::hasOpenGLFramebufferBlit() from creating a QGLWidget every time they
are called with no active GL context.
Reviewed-by: Trond
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|