Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
7a64d1e1
Kaydet (Commit)
7a64d1e1
authored
Kas 22, 2014
tarafından
Louis-Francis Ratté-Boulianne
Kaydeden (comit)
Jan Holesovsky
Kas 22, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcl: Improve precision and performance of clipping when region is a RegionBand
Change-Id: I7a481ba86d03b0eb8f4b456e38cfa89b6cbc209d
üst
fa77801f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
1 deletion
+41
-1
openglgdiimpl.hxx
vcl/inc/openglgdiimpl.hxx
+2
-0
gdiimpl.cxx
vcl/opengl/gdiimpl.cxx
+39
-1
No files found.
vcl/inc/openglgdiimpl.hxx
Dosyayı görüntüle @
7a64d1e1
...
...
@@ -24,6 +24,7 @@
#include <vcl/dllapi.h>
#include "opengl/texture.hxx"
#include "regionband.hxx"
#include <tools/poly.hxx>
#include <vcl/opengl/OpenGLContext.hxx>
...
...
@@ -125,6 +126,7 @@ public:
void
DrawRect
(
const
Rectangle
&
rRect
);
void
DrawPolygon
(
sal_uInt32
nPoints
,
const
SalPoint
*
pPtAry
);
void
DrawPolyPolygon
(
const
basegfx
::
B2DPolyPolygon
&
rPolyPolygon
);
void
DrawRegionBand
(
const
RegionBand
&
rRegion
);
void
DrawTextureRect
(
OpenGLTexture
&
rTexture
,
const
SalTwoRect
&
rPosAry
,
bool
bInverted
=
false
);
void
DrawTexture
(
OpenGLTexture
&
rTexture
,
const
SalTwoRect
&
rPosAry
,
bool
bInverted
=
false
);
void
DrawTransformedTexture
(
OpenGLTexture
&
rTexture
,
OpenGLTexture
&
rMask
,
const
basegfx
::
B2DPoint
&
rNull
,
const
basegfx
::
B2DPoint
&
rX
,
const
basegfx
::
B2DPoint
&
rY
);
...
...
vcl/opengl/gdiimpl.cxx
Dosyayı görüntüle @
7a64d1e1
...
...
@@ -247,7 +247,10 @@ void OpenGLSalGraphicsImpl::ImplSetClipBit( const vcl::Region& rClip, GLuint nMa
glClear
(
GL_STENCIL_BUFFER_BIT
);
BeginSolid
(
MAKE_SALCOLOR
(
0xFF
,
0xFF
,
0xFF
)
);
DrawPolyPolygon
(
rClip
.
GetAsB2DPolyPolygon
()
);
if
(
rClip
.
getRegionBand
()
)
DrawRegionBand
(
*
rClip
.
getRegionBand
()
);
else
DrawPolyPolygon
(
rClip
.
GetAsB2DPolyPolygon
()
);
EndSolid
();
glColorMask
(
GL_TRUE
,
GL_TRUE
,
GL_TRUE
,
GL_TRUE
);
...
...
@@ -793,6 +796,41 @@ void OpenGLSalGraphicsImpl::DrawPolyPolygon( const basegfx::B2DPolyPolygon& rPol
CHECK_GL_ERROR
();
}
void
OpenGLSalGraphicsImpl
::
DrawRegionBand
(
const
RegionBand
&
rRegion
)
{
RectangleVector
aRects
;
std
::
vector
<
GLfloat
>
aVertices
;
rRegion
.
GetRegionRectangles
(
aRects
);
if
(
aRects
.
empty
()
)
return
;
#define ADD_VERTICE(pt) \
aVertices.push_back( 2 * pt.X() / GetWidth() - 1.0 ); \
aVertices.push_back( 1.0 - (2 * pt.Y() / GetHeight()) );
for
(
size_t
i
=
0
;
i
<
aRects
.
size
();
++
i
)
{
aRects
[
i
].
Bottom
()
+=
1
;
aRects
[
i
].
Right
()
+=
1
;
ADD_VERTICE
(
aRects
[
i
].
TopLeft
()
);
ADD_VERTICE
(
aRects
[
i
].
TopRight
()
);
ADD_VERTICE
(
aRects
[
i
].
BottomLeft
()
);
ADD_VERTICE
(
aRects
[
i
].
BottomLeft
()
);
ADD_VERTICE
(
aRects
[
i
].
TopRight
()
);
ADD_VERTICE
(
aRects
[
i
].
BottomRight
()
);
}
#undef ADD_VERTICE
glEnableVertexAttribArray
(
GL_ATTRIB_POS
);
glVertexAttribPointer
(
GL_ATTRIB_POS
,
2
,
GL_FLOAT
,
GL_FALSE
,
0
,
&
aVertices
[
0
]
);
glDrawArrays
(
GL_TRIANGLES
,
0
,
aVertices
.
size
()
/
2
);
glDisableVertexAttribArray
(
GL_ATTRIB_POS
);
CHECK_GL_ERROR
();
}
void
OpenGLSalGraphicsImpl
::
DrawTextureRect
(
OpenGLTexture
&
rTexture
,
const
SalTwoRect
&
rPosAry
,
bool
bInverted
)
{
GLfloat
aTexCoord
[
8
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment