| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
omissions when qdoc is used in certain Windows environments.
Task-number: 256415
Reviewed-by: Trust Me
|
|
|
|
|
|
| |
Simplified caching of uniform locations.
Reviewed-by: Samuel
|
|
|
|
|
|
| |
Without this, QWindowSurface::flush() doesn't work.
Reviewed-by: Samuel
|
|
|
|
|
|
|
| |
Need to call syncState() to let the paint engine set depth clipping
state parameters back to their OpenGL defaults.
Reviewed-by: Trond
|
|
|
|
|
|
|
| |
This could potentially crash when a context was destroyed before
the actual font engine holding the QGLTextureGlyphCache was destroyed.
Reviewed-by: Samuel
|
|
|
|
|
|
|
| |
support
Merge-request: 604
Reviewed-by: Marius Storm-Olsen <marius@trolltech.com>
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
The sync() function properly sets up the state to allow using raw
OpenGL commands with an active QPainter, but we also need to properly
restore the state after sync() has been called and some other painting
operation is done.
Reviewed-by: Trond
|
|
|
|
|
|
|
|
|
|
|
| |
The gl_Position x, y, and z coordinates are always divided by the
homogenuous w coordinate to yield the final coordinates. Since we want
the depth to be constant for the whole item we need to premultiply it by
the w-coordinate. We can do this in the main() function in the vertex
programs since all the vertex programs use the depth uniform, thus
simplifying the programs a bit.
Reviewed-by: Trond
|
|
|
|
|
|
|
| |
Keep track of uniform locations for the current shader program in the
shader manager. Also don't change texture parameters unless necessary.
Reviewed-by: Kim
|
|\
| |
| |
| |
| | |
Conflicts:
src/sql/drivers/psql/qsql_psql.cpp
|
| |
| |
| |
| |
| |
| |
| | |
The offset was completely ignored for the GL 1 paint engine.
Task-number: 256608
Reviewed-by: Samuel
|
| |
| |
| |
| |
| | |
This change also moves the EGL support classes from QtOpenGL to QtGui
so they can be shared between OpenGL and OpenVG.
|
| |
| |
| |
| | |
Reviewed-by: Samuel
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Keep track of whether the depth clip has actually changed between
states, so that when QPainter::restore() is called we don't call the
potentially expensive updateDepthClip() function when not needed.
Task-number: 254658
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| |
| | |
When setState() is called right after createState() it means that none
of the OpenGL state needs changing, so we can simply return.
Task-number: 254658
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|
| |
| |
| |
| |
| |
| |
| |
| | |
The new glyph cache may return null images for e.g. space characters.
Task-number: 253468
Reviewed-by: Samuel
BT: yes
|
| |
| |
| |
| |
| |
| | |
This is a compilation fix reported by pulse agent on HPUXi.
Reviewed-by: Samuel
|
| |
| |
| |
| |
| |
| |
| | |
Switching multisampling is not supported in GLES 2.0, but it's supported
in GL 2.0 so we should do it on desktop at least.
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| | |
GL window surface and GL pixmap backend should work with old GL engine
as well, though not supported to the same degree.
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QPixmap shouldn't return true in hasAlphaChannel() for bitmaps, instead
the paint engine should check whether the pixmap is a bitmap or not. In
addition, QBrush::isOpaque() returned true for bitmap brushes, which is
wrong according to the documentation.
Reviewed-by: Trond
|
| |
| |
| |
| |
| | |
Calling premultiplyColor() with a red channel of 255, alpha channel of
255, and opacity 1 would result in a color with red channel of 254.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The pen color should be used when drawPixmap is called with a bitmap,
and the brush color should be used for texture patterns that are
bitmaps.
Task-number: 245802
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The window surface has been modified to track widget deletion to make
sure it doesn't try to access the widget's context data after deletion.
QGLPixmapData now also uses GL_RGB instead of GL_RGBA when appropriate,
and hasAlphaChannel() has been modified in view of this.
A number of other issues have been fixed in QGLPixmapData, and the
autotest has been modified to use a more lenient pixmap compare function
due to off-by-one pixel errors here and there.
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| |
| | |
If we're painting to very wide and then very tall pixmaps we don't want
the FBO to grow to max_width * max_height, instead we should recreate
the FBO if it grows too large compared to what's being painted.
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| |
| | |
Based on Zack's patch, 17e1bca1ce366395f8331e16aa96b7176ca1abac. Instead
of manually clearing the stencil buffer after drawing we simply do the
clearing and drawing in one go.
Reviewed-by: Trond
|
| |
| |
| |
| |
| | |
The new GL 2 text drawing requries the FBO function pointers to be
resolved.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use the stencil method to draw clip paths and regions to the Z-buffer
instead of using glClear / glScissor. Using different depth values for
the various clip parts also makes restore() very cheap when only
IntersectClip is used.
As an additional bonus this patch gives antialiased clip in the GL 2
paint engine.
Task-number: 254658
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| |
| | |
Moving qpaintengineex_opengl2_p.h down caused it to come after
an include of <X11/Xlib.h>, which causes problems on some platforms.
Move it back up again.
Reviewed-by: trustme
|
| |
| |
| |
| | |
Reviewed-by: trustme
|
| |
| |
| |
| | |
Reviewed-by: trustme
|
| |
| |
| |
| | |
Reviewed-by: trustme
|
| |
| |
| |
| |
| |
| |
| |
| | |
An alternative solution is to swap the order of
-I../../include and -I../../include/QtOpenGL when
compiling the opengl module.
Reviewed-by: TrustMe
|
| |
| |
| |
| |
| |
| |
| | |
seem fixable easily)
Merge-request: 594
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
|
| |
| |
| |
| |
| | |
Merge-request: 594
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
|
| |
| |
| |
| |
| | |
Task-number: QT-80
Reviewed-by: Ian Walters
|
| |
| |
| |
| |
| | |
Task-number: QT-80
Reviewed-by: Ian Walters
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now there's only a copy of the texture glyph cache in graphics memory,
avoiding the system memory copy that we used earlier. In addition the
texture will use the GL_ALPHA texture format when possible, making it
consume less graphics memory as well.
Reviewed-by: Tom
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To allow mixing QPainter and raw OpenGL commands we need to have some
way for the user to say that's he's about to use raw OpenGL so that we
are free to do buffering optimizations in the paint engines and use
either GL1 or GL2 paint engine. As there's already a syncState()
function in QPaintEngine we've reused this and added
QPaintEngineEx::sync() which takes care of syncing/flushing the paint
engine.
Reviewed-by: Trond
|
| | |
|
| |
| |
| |
| |
| | |
Make sure the correct texture unit is active when copying from the
pixmap to the FBO in begin().
|
| |
| |
| |
| |
| |
| |
| |
| | |
Even if the source pixels are opaque we have to enable blending for the
non-trivial composition modes. Some of the composition modes are
independent of source alpha and depend on destination alpha for example.
Reviewed-by: Tom
|
| | |
|
| |
| |
| |
| | |
Reviewed-By: TrustMe
|