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
9c48fae0
Kaydet (Commit)
9c48fae0
authored
Eki 12, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
opengl: remove code duplication when rendering a texture combo
Change-Id: Ic184e0e96103bb63322c8aaf8758c4c8f423e0b9
üst
c97ca26f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
19 deletions
+20
-19
gdiimpl.hxx
vcl/inc/opengl/win/gdiimpl.hxx
+2
-0
gdiimpl.cxx
vcl/opengl/win/gdiimpl.cxx
+18
-19
No files found.
vcl/inc/opengl/win/gdiimpl.hxx
Dosyayı görüntüle @
9c48fae0
...
...
@@ -33,6 +33,8 @@ protected:
virtual
rtl
::
Reference
<
OpenGLContext
>
CreateWinContext
()
SAL_OVERRIDE
;
virtual
bool
UseContext
(
const
rtl
::
Reference
<
OpenGLContext
>
&
pContext
)
SAL_OVERRIDE
;
bool
RenderTextureCombo
(
TextureCombo
&
rCombo
,
int
nX
,
int
nY
);
public
:
virtual
void
Init
()
SAL_OVERRIDE
;
virtual
void
copyBits
(
const
SalTwoRect
&
rPosAry
,
SalGraphics
*
pSrcGraphics
)
SAL_OVERRIDE
;
...
...
vcl/opengl/win/gdiimpl.cxx
Dosyayı görüntüle @
9c48fae0
...
...
@@ -87,19 +87,25 @@ bool WinOpenGLSalGraphicsImpl::TryRenderCachedNativeControl(ControlCacheKey& rCo
const
std
::
unique_ptr
<
TextureCombo
>&
pCombo
=
iterator
->
second
;
bool
bRet
=
false
;
PreDraw
();
OpenGLTexture
&
rTexture
=
*
pCombo
->
mpTexture
;
bRet
=
RenderTextureCombo
(
*
pCombo
,
nX
,
nY
)
;
SalTwoRect
aPosAry
(
0
,
0
,
rTexture
.
GetWidth
(),
rTexture
.
GetHeight
(),
nX
,
nY
,
rTexture
.
GetWidth
(),
rTexture
.
GetHeight
());
PostDraw
();
return
bRet
;
}
if
(
pCombo
->
mpMask
)
DrawTextureDiff
(
rTexture
,
*
pCombo
->
mpMask
,
aPosAry
);
else
DrawTexture
(
rTexture
,
aPosAry
);
bool
WinOpenGLSalGraphicsImpl
::
RenderTextureCombo
(
TextureCombo
&
rCombo
,
int
nX
,
int
nY
)
{
OpenGLTexture
&
rTexture
=
*
rCombo
.
mpTexture
;
PostDraw
();
SalTwoRect
aPosAry
(
0
,
0
,
rTexture
.
GetWidth
(),
rTexture
.
GetHeight
(),
nX
,
nY
,
rTexture
.
GetWidth
(),
rTexture
.
GetHeight
());
DrawTextureDiff
(
rTexture
,
*
rCombo
.
mpMask
,
aPosAry
);
return
true
;
}
...
...
@@ -107,24 +113,17 @@ bool WinOpenGLSalGraphicsImpl::TryRenderCachedNativeControl(ControlCacheKey& rCo
bool
WinOpenGLSalGraphicsImpl
::
RenderCompatibleDC
(
OpenGLCompatibleDC
&
rWhite
,
OpenGLCompatibleDC
&
rBlack
,
int
nX
,
int
nY
,
TextureCombo
&
rCombo
)
{
bool
bRet
=
false
;
PreDraw
();
rCombo
.
mpTexture
.
reset
(
rWhite
.
getTexture
());
rCombo
.
mpMask
.
reset
(
rBlack
.
getTexture
());
if
(
rCombo
.
mpTexture
&&
rCombo
.
mpMask
)
{
OpenGLTexture
&
rTexture
=
*
rCombo
.
mpTexture
;
SalTwoRect
aPosAry
(
0
,
0
,
rTexture
.
GetWidth
(),
rTexture
.
GetHeight
(),
nX
,
nY
,
rTexture
.
GetWidth
(),
rTexture
.
GetHeight
());
DrawTextureDiff
(
*
rCombo
.
mpTexture
,
*
rCombo
.
mpMask
,
aPosAry
);
}
bRet
=
RenderTextureCombo
(
rCombo
,
nX
,
nY
);
PostDraw
();
return
true
;
return
bRet
;
}
bool
WinOpenGLSalGraphicsImpl
::
RenderAndCacheNativeControl
(
OpenGLCompatibleDC
&
rWhite
,
OpenGLCompatibleDC
&
rBlack
,
...
...
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