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
9ac5aa94
Kaydet (Commit)
9ac5aa94
authored
Kas 12, 2014
tarafından
Louis-Francis Ratté-Boulianne
Kaydeden (comit)
Markus Mohrhard
Kas 13, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcl: Use new size when scaling with filter in OpenGL backend
Change-Id: Ib5d12b0e57b537bbd1798121e80cd517d9c8f751
üst
dc189f79
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
salbmp.hxx
vcl/inc/opengl/salbmp.hxx
+1
-1
scale.cxx
vcl/opengl/scale.cxx
+11
-4
No files found.
vcl/inc/opengl/salbmp.hxx
Dosyayı görüntüle @
9ac5aa94
...
...
@@ -106,7 +106,7 @@ private:
GLuint
mnConvKernelSizeUniform
;
GLuint
mnConvOffsetsUniform
;
bool
ImplScaleFilter
(
GLenum
nFilter
);
bool
ImplScaleFilter
(
const
double
&
rScaleX
,
const
double
&
rScaleY
,
GLenum
nFilter
);
void
ImplCreateKernel
(
const
double
&
fScale
,
const
Kernel
&
rKernel
,
GLfloat
*&
pWeights
,
sal_uInt32
&
aKernelSize
);
bool
ImplScaleConvolution
(
const
double
&
rScaleX
,
const
double
&
rScaleY
,
const
Kernel
&
aKernel
);
...
...
vcl/opengl/scale.cxx
Dosyayı görüntüle @
9ac5aa94
...
...
@@ -81,12 +81,17 @@ GLuint OpenGLSalBitmap::ImplGetConvolutionProgram()
return
mnConvProgram
;
}
bool
OpenGLSalBitmap
::
ImplScaleFilter
(
GLenum
nFilter
)
bool
OpenGLSalBitmap
::
ImplScaleFilter
(
const
double
&
rScaleX
,
const
double
&
rScaleY
,
GLenum
nFilter
)
{
OpenGLTexture
*
pNewTex
;
GLuint
nProgram
;
GLuint
nFramebufferId
;
GLenum
nOldFilter
;
int
nNewWidth
(
mnWidth
*
rScaleX
);
int
nNewHeight
(
mnHeight
*
rScaleY
);
nProgram
=
ImplGetTextureProgram
();
if
(
nProgram
==
0
)
...
...
@@ -97,7 +102,7 @@ bool OpenGLSalBitmap::ImplScaleFilter( GLenum nFilter )
glUseProgram
(
nProgram
);
glUniform1i
(
mnTexSamplerUniform
,
0
);
pNewTex
=
new
OpenGLTexture
(
mnWidth
,
mn
Height
);
pNewTex
=
new
OpenGLTexture
(
nNewWidth
,
nNew
Height
);
glFramebufferTexture2D
(
GL_FRAMEBUFFER
,
GL_COLOR_ATTACHMENT0
,
GL_TEXTURE_2D
,
pNewTex
->
Id
(),
0
);
mpTexture
->
Bind
();
...
...
@@ -111,6 +116,8 @@ bool OpenGLSalBitmap::ImplScaleFilter( GLenum nFilter )
glBindFramebuffer
(
GL_FRAMEBUFFER
,
0
);
glDeleteFramebuffers
(
1
,
&
nFramebufferId
);
mnWidth
=
nNewWidth
;
mnHeight
=
nNewHeight
;
mpTexture
.
reset
(
pNewTex
);
CHECK_GL_ERROR
();
...
...
@@ -241,11 +248,11 @@ bool OpenGLSalBitmap::ImplScale( const double& rScaleX, const double& rScaleY, s
if
(
nScaleFlag
==
BMP_SCALE_FAST
)
{
return
ImplScaleFilter
(
GL_NEAREST
);
return
ImplScaleFilter
(
rScaleX
,
rScaleY
,
GL_NEAREST
);
}
if
(
nScaleFlag
==
BMP_SCALE_BILINEAR
)
{
return
ImplScaleFilter
(
GL_LINEAR
);
return
ImplScaleFilter
(
rScaleX
,
rScaleY
,
GL_LINEAR
);
}
else
if
(
nScaleFlag
==
BMP_SCALE_SUPER
)
{
...
...
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