summaryrefslogtreecommitdiff
path: root/vcl/win/source/gdi/salgdi.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-11-20 18:49:03 +0100
committerJan Holesovsky <kendy@collabora.com>2014-11-20 18:52:03 +0100
commit57d6b92b69a31260dea0d84fcd1fc5866ada7adb (patch)
treefd2789496e46a88db4bd4a39a22a9c6020d66d65 /vcl/win/source/gdi/salgdi.cxx
parent3f94c9e9ddfd807b449f3bb9b232cf2041fa12d2 (diff)
windows opengl: Implement the native theming with OpenGL.libreoffice-4-4-branch-point
Change-Id: If8eb5cef228f4eb28e16de3e3135742282403cdc
Diffstat (limited to 'vcl/win/source/gdi/salgdi.cxx')
-rw-r--r--vcl/win/source/gdi/salgdi.cxx21
1 files changed, 13 insertions, 8 deletions
diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx
index d011f3168282..678067d1add3 100644
--- a/vcl/win/source/gdi/salgdi.cxx
+++ b/vcl/win/source/gdi/salgdi.cxx
@@ -601,18 +601,23 @@ OpenGLCompatibleDC::~OpenGLCompatibleDC()
}
}
-void OpenGLCompatibleDC::DrawMask(SalColor color)
+void OpenGLCompatibleDC::fill(sal_uInt32 color)
{
- if (!mpImpl)
+ if (!mpData)
return;
- // turn what's in the mpData into a texture
- OpenGLTexture aTexture(maRects.mnSrcWidth, maRects.mnSrcHeight, GL_RGBA, GL_UNSIGNED_BYTE, mpData);
- CHECK_GL_ERROR();
+ sal_uInt32 *p = mpData;
+ for (int i = maRects.mnSrcWidth * maRects.mnSrcHeight; i > 0; --i)
+ *p++ = color;
+}
- mpImpl->PreDraw();
- mpImpl->DrawMask(aTexture, color, maRects);
- mpImpl->PostDraw();
+OpenGLTexture* OpenGLCompatibleDC::getTexture()
+{
+ if (!mpImpl)
+ return NULL;
+
+ // turn what's in the mpData into a texture
+ return new OpenGLTexture(maRects.mnSrcWidth, maRects.mnSrcHeight, GL_RGBA, GL_UNSIGNED_BYTE, reinterpret_cast<sal_uInt8*>(mpData));
}
WinSalGraphics::WinSalGraphics(WinSalGraphics::Type eType, bool bScreen, HWND hWnd):