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
bcc458c1
Kaydet (Commit)
bcc458c1
authored
Eyl 01, 2015
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Tweak VCL unit tests for OpenGL.
Change-Id: Ia36f8424226da4e66ae991abd4d6f24604db324c
üst
04ff8103
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
+19
-7
BitmapTest.cxx
vcl/qa/cppunit/BitmapTest.cxx
+19
-7
No files found.
vcl/qa/cppunit/BitmapTest.cxx
Dosyayı görüntüle @
bcc458c1
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include <rtl/strbuf.hxx>
#include <rtl/strbuf.hxx>
#include <tools/stream.hxx>
#include <tools/stream.hxx>
#include <vcl/graphicfilter.hxx>
#include <vcl/graphicfilter.hxx>
#include <vcl/opengl/OpenGLHelper.hxx>
#include "BitmapSymmetryCheck.hxx"
#include "BitmapSymmetryCheck.hxx"
...
@@ -51,11 +52,16 @@ void BitmapTest::testConvert()
...
@@ -51,11 +52,16 @@ void BitmapTest::testConvert()
Bitmap
::
ScopedReadAccess
pReadAccess
(
aBitmap
);
Bitmap
::
ScopedReadAccess
pReadAccess
(
aBitmap
);
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
sal_uInt16
>
(
8
),
pReadAccess
->
GetBitCount
());
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
sal_uInt16
>
(
8
),
pReadAccess
->
GetBitCount
());
#if defined WNT
#if defined WNT
// Scanlines padded to DWORD multiples, it seems
if
(
!
OpenGLHelper
::
isVCLOpenGLEnabled
())
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
sal_uLong
>
(
12
),
pReadAccess
->
GetScanlineSize
());
{
#else
// GDI Scanlines padded to DWORD multiples, it seems
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
sal_uLong
>
(
10
),
pReadAccess
->
GetScanlineSize
());
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
sal_uLong
>
(
12
),
pReadAccess
->
GetScanlineSize
());
}
else
#endif
#endif
{
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
sal_uLong
>
(
10
),
pReadAccess
->
GetScanlineSize
());
}
CPPUNIT_ASSERT
(
pReadAccess
->
HasPalette
());
CPPUNIT_ASSERT
(
pReadAccess
->
HasPalette
());
const
BitmapColor
&
rColor
=
pReadAccess
->
GetPaletteColor
(
pReadAccess
->
GetPixelIndex
(
1
,
1
));
const
BitmapColor
&
rColor
=
pReadAccess
->
GetPaletteColor
(
pReadAccess
->
GetPixelIndex
(
1
,
1
));
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
204
),
sal_Int32
(
rColor
.
GetRed
()));
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
204
),
sal_Int32
(
rColor
.
GetRed
()));
...
@@ -75,10 +81,16 @@ void BitmapTest::testConvert()
...
@@ -75,10 +81,16 @@ void BitmapTest::testConvert()
#else
#else
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
sal_uInt16
>
(
24
),
pReadAccess
->
GetBitCount
());
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
sal_uInt16
>
(
24
),
pReadAccess
->
GetBitCount
());
#if defined WNT
#if defined WNT
CPPUNIT_ASSERT_EQUAL
(
sal_uLong
(
32
),
pReadAccess
->
GetScanlineSize
());
if
(
!
OpenGLHelper
::
isVCLOpenGLEnabled
())
#else
{
CPPUNIT_ASSERT_EQUAL
(
sal_uLong
(
30
),
pReadAccess
->
GetScanlineSize
());
// GDI Scanlines padded to DWORD multiples, it seems
CPPUNIT_ASSERT_EQUAL
(
sal_uLong
(
32
),
pReadAccess
->
GetScanlineSize
());
}
else
#endif
#endif
{
CPPUNIT_ASSERT_EQUAL
(
sal_uLong
(
30
),
pReadAccess
->
GetScanlineSize
());
}
#endif
#endif
CPPUNIT_ASSERT
(
!
pReadAccess
->
HasPalette
());
CPPUNIT_ASSERT
(
!
pReadAccess
->
HasPalette
());
Color
aColor
=
pReadAccess
->
GetPixel
(
0
,
0
);
Color
aColor
=
pReadAccess
->
GetPixel
(
0
,
0
);
...
...
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