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
89ec42e1
Kaydet (Commit)
89ec42e1
authored
Kas 17, 2014
tarafından
Louis-Francis Ratté-Boulianne
Kaydeden (comit)
Jan Holesovsky
Kas 18, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcl: Execute pending operations on source when copying bitmap
Change-Id: I8a6a5ffe71c9e5f16533fd1f0944d4fd2a051c73
üst
21cf4432
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
22 deletions
+32
-22
salbmp.hxx
vcl/inc/opengl/salbmp.hxx
+2
-1
gdiimpl.cxx
vcl/opengl/gdiimpl.cxx
+9
-9
salbmp.cxx
vcl/opengl/salbmp.cxx
+20
-12
scale.cxx
vcl/opengl/scale.cxx
+1
-0
No files found.
vcl/inc/opengl/salbmp.hxx
Dosyayı görüntüle @
89ec42e1
...
...
@@ -84,10 +84,11 @@ public:
public
:
bool
Create
(
OpenGLContext
&
rContext
,
const
OpenGLTexture
&
rTex
,
long
nX
,
long
nY
,
long
nWidth
,
long
nHeight
);
OpenGLTexture
&
GetTexture
(
OpenGLContext
&
rContext
)
const
;
OpenGLTexture
&
GetTexture
()
const
;
private
:
void
ExecuteOperations
();
GLuint
CreateTexture
();
void
DeleteTexture
();
void
DrawTexture
(
GLuint
nTexture
,
const
SalTwoRect
&
rPosAry
);
...
...
vcl/opengl/gdiimpl.cxx
Dosyayı görüntüle @
89ec42e1
...
...
@@ -1338,7 +1338,7 @@ void OpenGLSalGraphicsImpl::drawBitmap( const SalTwoRect& rPosAry, const SalBitm
assert
(
dynamic_cast
<
const
OpenGLSalBitmap
*>
(
&
rSalBitmap
));
const
OpenGLSalBitmap
&
rBitmap
=
static_cast
<
const
OpenGLSalBitmap
&>
(
rSalBitmap
);
OpenGLTexture
&
rTexture
=
rBitmap
.
GetTexture
(
maContext
);
OpenGLTexture
&
rTexture
=
rBitmap
.
GetTexture
();
SAL_INFO
(
"vcl.opengl"
,
"::drawBitmap"
);
PreDraw
();
...
...
@@ -1361,8 +1361,8 @@ void OpenGLSalGraphicsImpl::drawBitmap(
{
const
OpenGLSalBitmap
&
rBitmap
=
static_cast
<
const
OpenGLSalBitmap
&>
(
rSalBitmap
);
const
OpenGLSalBitmap
&
rMask
=
static_cast
<
const
OpenGLSalBitmap
&>
(
rMaskBitmap
);
OpenGLTexture
&
rTexture
(
rBitmap
.
GetTexture
(
maContext
)
);
OpenGLTexture
&
rMaskTex
(
rMask
.
GetTexture
(
maContext
)
);
OpenGLTexture
&
rTexture
(
rBitmap
.
GetTexture
()
);
OpenGLTexture
&
rMaskTex
(
rMask
.
GetTexture
()
);
SAL_INFO
(
"vcl.opengl"
,
"::drawBitmap with MASK"
);
PreDraw
();
...
...
@@ -1376,7 +1376,7 @@ void OpenGLSalGraphicsImpl::drawMask(
SalColor
nMaskColor
)
{
const
OpenGLSalBitmap
&
rBitmap
=
static_cast
<
const
OpenGLSalBitmap
&>
(
rSalBitmap
);
OpenGLTexture
&
rTexture
(
rBitmap
.
GetTexture
(
maContext
)
);
OpenGLTexture
&
rTexture
(
rBitmap
.
GetTexture
()
);
SAL_INFO
(
"vcl.opengl"
,
"::drawMask"
);
PreDraw
();
...
...
@@ -1491,8 +1491,8 @@ bool OpenGLSalGraphicsImpl::drawAlphaBitmap(
{
const
OpenGLSalBitmap
&
rBitmap
=
static_cast
<
const
OpenGLSalBitmap
&>
(
rSalBitmap
);
const
OpenGLSalBitmap
&
rAlpha
=
static_cast
<
const
OpenGLSalBitmap
&>
(
rAlphaBitmap
);
OpenGLTexture
&
rTexture
(
rBitmap
.
GetTexture
(
maContext
)
);
OpenGLTexture
&
rAlphaTex
(
rAlpha
.
GetTexture
(
maContext
)
);
OpenGLTexture
&
rTexture
(
rBitmap
.
GetTexture
()
);
OpenGLTexture
&
rAlphaTex
(
rAlpha
.
GetTexture
()
);
SAL_INFO
(
"vcl.opengl"
,
"::drawAlphaBitmap"
);
PreDraw
();
...
...
@@ -1506,7 +1506,7 @@ bool OpenGLSalGraphicsImpl::drawAlphaBitmap(
const
SalBitmap
&
rSalBitmap
)
{
const
OpenGLSalBitmap
&
rBitmap
=
static_cast
<
const
OpenGLSalBitmap
&>
(
rSalBitmap
);
OpenGLTexture
&
rTexture
(
rBitmap
.
GetTexture
(
maContext
)
);
OpenGLTexture
&
rTexture
(
rBitmap
.
GetTexture
()
);
SAL_INFO
(
"vcl.opengl"
,
"::drawAlphaBitmap"
);
PreDraw
();
...
...
@@ -1527,11 +1527,11 @@ bool OpenGLSalGraphicsImpl::drawTransformedBitmap(
{
const
OpenGLSalBitmap
&
rBitmap
=
static_cast
<
const
OpenGLSalBitmap
&>
(
rSrcBitmap
);
const
OpenGLSalBitmap
*
pMaskBitmap
=
static_cast
<
const
OpenGLSalBitmap
*>
(
pAlphaBitmap
);
OpenGLTexture
&
rTexture
(
rBitmap
.
GetTexture
(
maContext
)
);
OpenGLTexture
&
rTexture
(
rBitmap
.
GetTexture
()
);
OpenGLTexture
aMask
;
// no texture
if
(
pMaskBitmap
!=
NULL
)
aMask
=
pMaskBitmap
->
GetTexture
(
maContext
);
aMask
=
pMaskBitmap
->
GetTexture
();
SAL_INFO
(
"vcl.opengl"
,
"::drawTransformedBitmap"
);
PreDraw
();
...
...
vcl/opengl/salbmp.cxx
Dosyayı görüntüle @
89ec42e1
...
...
@@ -130,8 +130,9 @@ bool OpenGLSalBitmap::Create( const SalBitmap& rSalBmp, sal_uInt16 nNewBitCount
mnBufWidth
=
rSourceBitmap
.
mnBufWidth
;
mnBufHeight
=
rSourceBitmap
.
mnBufHeight
;
maPalette
=
rSourceBitmap
.
maPalette
;
// execute any pending operations on the source bitmap
maTexture
=
rSourceBitmap
.
GetTexture
();
mpContext
=
rSourceBitmap
.
mpContext
;
maTexture
=
rSourceBitmap
.
maTexture
;
mbDirtyTexture
=
false
;
maUserBuffer
=
rSourceBitmap
.
maUserBuffer
;
...
...
@@ -147,13 +148,13 @@ bool OpenGLSalBitmap::Create( const ::com::sun::star::uno::Reference< ::com::sun
return
false
;
}
OpenGLTexture
&
OpenGLSalBitmap
::
GetTexture
(
OpenGLContext
&
rContext
)
const
OpenGLTexture
&
OpenGLSalBitmap
::
GetTexture
()
const
{
OpenGLSalBitmap
*
pThis
=
const_cast
<
OpenGLSalBitmap
*>
(
this
);
if
(
!
mpContext
)
pThis
->
mpContext
=
&
rContext
;
if
(
!
maTexture
||
mbDirtyTexture
)
pThis
->
CreateTexture
();
else
if
(
!
maPendingOps
.
empty
()
)
pThis
->
ExecuteOperations
();
SAL_INFO
(
"vcl.opengl"
,
"Got texture "
<<
maTexture
.
Id
()
);
return
pThis
->
maTexture
;
}
...
...
@@ -327,6 +328,17 @@ Size OpenGLSalBitmap::GetSize() const
return
aSize
;
}
void
OpenGLSalBitmap
::
ExecuteOperations
()
{
makeCurrent
();
while
(
!
maPendingOps
.
empty
()
)
{
OpenGLSalBitmapOp
*
pOp
=
maPendingOps
.
front
();
pOp
->
Execute
();
maPendingOps
.
pop_front
();
}
}
GLuint
OpenGLSalBitmap
::
CreateTexture
()
{
SAL_INFO
(
"vcl.opengl"
,
"::CreateTexture"
);
...
...
@@ -395,20 +407,16 @@ GLuint OpenGLSalBitmap::CreateTexture()
}
}
makeCurrent
();
if
(
!
makeCurrent
()
)
return
0
;
maTexture
=
OpenGLTexture
(
mnBufWidth
,
mnBufHeight
,
nFormat
,
nType
,
pData
);
SAL_INFO
(
"vcl.opengl"
,
"Created texture "
<<
maTexture
.
Id
()
);
if
(
bAllocated
)
delete
[]
pData
;
while
(
!
maPendingOps
.
empty
()
)
{
OpenGLSalBitmapOp
*
pOp
=
maPendingOps
.
front
();
pOp
->
Execute
();
maPendingOps
.
pop_front
();
}
ExecuteOperations
();
mbDirtyTexture
=
false
;
CHECK_GL_ERROR
();
...
...
vcl/opengl/scale.cxx
Dosyayı görüntüle @
89ec42e1
...
...
@@ -104,6 +104,7 @@ bool OpenGLSalBitmap::ImplScaleFilter(
OpenGLTexture
aNewTex
=
OpenGLTexture
(
nNewWidth
,
nNewHeight
);
glFramebufferTexture2D
(
GL_FRAMEBUFFER
,
GL_COLOR_ATTACHMENT0
,
GL_TEXTURE_2D
,
aNewTex
.
Id
(),
0
);
glViewport
(
0
,
0
,
nNewWidth
,
nNewHeight
);
maTexture
.
Bind
();
nOldFilter
=
maTexture
.
GetFilter
();
maTexture
.
SetFilter
(
nFilter
);
...
...
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