summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase-git/0010-QOpenGLPaintDevice-sub-area-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-qt/qt5/qtbase-git/0010-QOpenGLPaintDevice-sub-area-support.patch')
-rw-r--r--recipes-qt/qt5/qtbase-git/0010-QOpenGLPaintDevice-sub-area-support.patch54
1 files changed, 30 insertions, 24 deletions
diff --git a/recipes-qt/qt5/qtbase-git/0010-QOpenGLPaintDevice-sub-area-support.patch b/recipes-qt/qt5/qtbase-git/0010-QOpenGLPaintDevice-sub-area-support.patch
index db979bd4..51a244d7 100644
--- a/recipes-qt/qt5/qtbase-git/0010-QOpenGLPaintDevice-sub-area-support.patch
+++ b/recipes-qt/qt5/qtbase-git/0010-QOpenGLPaintDevice-sub-area-support.patch
@@ -1,4 +1,4 @@
1From 709c35b889e46f2b1bc36d88c732f1b440e6c236 Mon Sep 17 00:00:00 2001 1From e7b9af7232c4f7eb50933dde208e58438bedd964 Mon Sep 17 00:00:00 2001
2From: Jani Hautakangas <jani.hautakangas@ixonos.com> 2From: Jani Hautakangas <jani.hautakangas@ixonos.com>
3Date: Thu, 16 May 2013 09:52:07 +0300 3Date: Thu, 16 May 2013 09:52:07 +0300
4Subject: [PATCH 10/11] QOpenGLPaintDevice sub-area support 4Subject: [PATCH 10/11] QOpenGLPaintDevice sub-area support
@@ -12,26 +12,19 @@ Change-Id: Ida2f079aa1ac0b87d36b54129e226399dbcdda80
12 12
13Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> 13Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
14--- 14---
15 src/gui/opengl/qopenglpaintdevice.cpp | 12 ++++++++++++ 15 src/gui/opengl/qopenglpaintdevice.cpp | 11 +++++++++++
16 src/gui/opengl/qopenglpaintdevice.h | 2 ++ 16 src/gui/opengl/qopenglpaintdevice.h | 2 ++
17 src/gui/opengl/qopenglpaintdevice_p.h | 1 +
17 src/gui/opengl/qopenglpaintengine.cpp | 9 +++++++-- 18 src/gui/opengl/qopenglpaintengine.cpp | 9 +++++++--
18 src/gui/opengl/qopenglpaintengine_p.h | 1 + 19 src/gui/opengl/qopenglpaintengine_p.h | 1 +
19 src/gui/opengl/qopengltextureglyphcache.cpp | 2 +- 20 src/gui/opengl/qopengltextureglyphcache.cpp | 2 +-
20 5 files changed, 23 insertions(+), 3 deletions(-) 21 6 files changed, 23 insertions(+), 3 deletions(-)
21 22
22diff --git a/src/gui/opengl/qopenglpaintdevice.cpp b/src/gui/opengl/qopenglpaintdevice.cpp 23diff --git a/src/gui/opengl/qopenglpaintdevice.cpp b/src/gui/opengl/qopenglpaintdevice.cpp
23index 59bca6e..ea0ee88 100644 24index e908fd8..8f0ef56 100644
24--- a/src/gui/opengl/qopenglpaintdevice.cpp 25--- a/src/gui/opengl/qopenglpaintdevice.cpp
25+++ b/src/gui/opengl/qopenglpaintdevice.cpp 26+++ b/src/gui/opengl/qopenglpaintdevice.cpp
26@@ -103,6 +103,7 @@ class QOpenGLPaintDevicePrivate 27@@ -135,6 +135,12 @@ QOpenGLPaintDevice::QOpenGLPaintDevice(int width, int height)
27 public:
28 QOpenGLPaintDevicePrivate(const QSize &size);
29
30+ QPoint offset;
31 QSize size;
32 QOpenGLContext *ctx;
33
34@@ -151,6 +152,12 @@ QOpenGLPaintDevice::QOpenGLPaintDevice(int width, int height)
35 { 28 {
36 } 29 }
37 30
@@ -42,9 +35,9 @@ index 59bca6e..ea0ee88 100644
42+} 35+}
43+ 36+
44 /*! 37 /*!
45 Destroys the QOpenGLPaintDevice. 38 \internal
46 */ 39 */
47@@ -220,6 +227,11 @@ QOpenGLContext *QOpenGLPaintDevice::context() const 40@@ -212,6 +218,11 @@ QOpenGLContext *QOpenGLPaintDevice::context() const
48 return d_ptr->ctx; 41 return d_ptr->ctx;
49 } 42 }
50 43
@@ -57,17 +50,18 @@ index 59bca6e..ea0ee88 100644
57 Returns the pixel size of the paint device. 50 Returns the pixel size of the paint device.
58 51
59diff --git a/src/gui/opengl/qopenglpaintdevice.h b/src/gui/opengl/qopenglpaintdevice.h 52diff --git a/src/gui/opengl/qopenglpaintdevice.h b/src/gui/opengl/qopenglpaintdevice.h
60index e1be9b5..1a3ddbc 100644 53index dda3bfe..9965553 100644
61--- a/src/gui/opengl/qopenglpaintdevice.h 54--- a/src/gui/opengl/qopenglpaintdevice.h
62+++ b/src/gui/opengl/qopenglpaintdevice.h 55+++ b/src/gui/opengl/qopenglpaintdevice.h
63@@ -54,12 +54,14 @@ public: 56@@ -53,6 +53,7 @@ public:
64 QOpenGLPaintDevice(); 57 QOpenGLPaintDevice();
65 explicit QOpenGLPaintDevice(const QSize &size); 58 explicit QOpenGLPaintDevice(const QSize &size);
66 QOpenGLPaintDevice(int width, int height); 59 QOpenGLPaintDevice(int width, int height);
67+ QOpenGLPaintDevice(int x, int y, int width, int height); 60+ QOpenGLPaintDevice(int x, int y, int width, int height);
61 QOpenGLPaintDevice(QOpenGLPaintDevicePrivate *dd);
68 virtual ~QOpenGLPaintDevice(); 62 virtual ~QOpenGLPaintDevice();
69 63
70 int devType() const { return QInternal::OpenGL; } 64@@ -60,6 +61,7 @@ public:
71 QPaintEngine *paintEngine() const; 65 QPaintEngine *paintEngine() const;
72 66
73 QOpenGLContext *context() const; 67 QOpenGLContext *context() const;
@@ -75,11 +69,23 @@ index e1be9b5..1a3ddbc 100644
75 QSize size() const; 69 QSize size() const;
76 void setSize(const QSize &size); 70 void setSize(const QSize &size);
77 void setDevicePixelRatio(qreal devicePixelRatio); 71 void setDevicePixelRatio(qreal devicePixelRatio);
72diff --git a/src/gui/opengl/qopenglpaintdevice_p.h b/src/gui/opengl/qopenglpaintdevice_p.h
73index 0b01129..211f2f3 100644
74--- a/src/gui/opengl/qopenglpaintdevice_p.h
75+++ b/src/gui/opengl/qopenglpaintdevice_p.h
76@@ -65,6 +65,7 @@ public:
77
78 public:
79 QSize size;
80+ QPoint offset;
81 QOpenGLContext *ctx;
82
83 qreal dpmx;
78diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp 84diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
79index 21bc4a9..ce008a4 100644 85index c490726..1d775fd 100644
80--- a/src/gui/opengl/qopenglpaintengine.cpp 86--- a/src/gui/opengl/qopenglpaintengine.cpp
81+++ b/src/gui/opengl/qopenglpaintengine.cpp 87+++ b/src/gui/opengl/qopenglpaintengine.cpp
82@@ -1999,7 +1999,10 @@ bool QOpenGL2PaintEngineEx::begin(QPaintDevice *pdev) 88@@ -2002,7 +2002,10 @@ bool QOpenGL2PaintEngineEx::begin(QPaintDevice *pdev)
83 for (int i = 0; i < QT_GL_VERTEX_ARRAY_TRACKED_COUNT; ++i) 89 for (int i = 0; i < QT_GL_VERTEX_ARRAY_TRACKED_COUNT; ++i)
84 d->vertexAttributeArraysEnabledState[i] = false; 90 d->vertexAttributeArraysEnabledState[i] = false;
85 91
@@ -90,7 +96,7 @@ index 21bc4a9..ce008a4 100644
90 d->width = sz.width(); 96 d->width = sz.width();
91 d->height = sz.height(); 97 d->height = sz.height();
92 d->mode = BrushDrawingMode; 98 d->mode = BrushDrawingMode;
93@@ -2084,7 +2087,7 @@ void QOpenGL2PaintEngineEx::ensureActive() 99@@ -2089,7 +2092,7 @@ void QOpenGL2PaintEngineEx::ensureActive()
94 d->device->ensureActiveTarget(); 100 d->device->ensureActiveTarget();
95 101
96 d->transferMode(BrushDrawingMode); 102 d->transferMode(BrushDrawingMode);
@@ -99,7 +105,7 @@ index 21bc4a9..ce008a4 100644
99 d->needsSync = false; 105 d->needsSync = false;
100 d->lastMaskTextureUsed = 0; 106 d->lastMaskTextureUsed = 0;
101 d->shaderManager->setDirty(); 107 d->shaderManager->setDirty();
102@@ -2127,6 +2130,7 @@ void QOpenGL2PaintEngineExPrivate::updateClipScissorTest() 108@@ -2132,6 +2135,7 @@ void QOpenGL2PaintEngineExPrivate::updateClipScissorTest()
103 if (bounds == QRect(0, 0, width, height)) { 109 if (bounds == QRect(0, 0, width, height)) {
104 funcs.glDisable(GL_SCISSOR_TEST); 110 funcs.glDisable(GL_SCISSOR_TEST);
105 } else { 111 } else {
@@ -107,7 +113,7 @@ index 21bc4a9..ce008a4 100644
107 funcs.glEnable(GL_SCISSOR_TEST); 113 funcs.glEnable(GL_SCISSOR_TEST);
108 setScissor(bounds); 114 setScissor(bounds);
109 } 115 }
110@@ -2135,12 +2139,13 @@ void QOpenGL2PaintEngineExPrivate::updateClipScissorTest() 116@@ -2140,12 +2144,13 @@ void QOpenGL2PaintEngineExPrivate::updateClipScissorTest()
111 117
112 void QOpenGL2PaintEngineExPrivate::setScissor(const QRect &rect) 118 void QOpenGL2PaintEngineExPrivate::setScissor(const QRect &rect)
113 { 119 {