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
de1977fe
Kaydet (Commit)
de1977fe
authored
May 14, 2015
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
rendercontext: Double-buffering using the RenderContext.
Change-Id: Ie28ba11dd62733a3c2ae796b43f1a8f0a8c16c2d
üst
68041a05
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
2 deletions
+67
-2
paint.cxx
vcl/source/window/paint.cxx
+67
-2
No files found.
vcl/source/window/paint.cxx
Dosyayı görüntüle @
de1977fe
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include <vcl/cursor.hxx>
#include <vcl/cursor.hxx>
#include <vcl/settings.hxx>
#include <vcl/settings.hxx>
#include <officecfg/Office/Common.hxx>
#include <sal/types.h>
#include <sal/types.h>
#include <window.h>
#include <window.h>
...
@@ -117,11 +118,75 @@ void PaintHelper::DoPaint(const vcl::Region* pRegion)
...
@@ -117,11 +118,75 @@ void PaintHelper::DoPaint(const vcl::Region* pRegion)
pWindowImpl
->
maInvalidateRegion
.
Intersect
(
*
pWinChildClipRegion
);
pWindowImpl
->
maInvalidateRegion
.
Intersect
(
*
pWinChildClipRegion
);
}
}
pWindowImpl
->
mnPaintFlags
=
0
;
pWindowImpl
->
mnPaintFlags
=
0
;
if
(
!
pWindowImpl
->
maInvalidateRegion
.
IsEmpty
()
)
if
(
!
pWindowImpl
->
maInvalidateRegion
.
IsEmpty
()
)
{
{
m_pWindow
->
BeginPaint
();
m_pWindow
->
BeginPaint
();
m_pWindow
->
PushPaintHelper
(
this
);
m_pWindow
->
PushPaintHelper
(
this
);
m_pWindow
->
Paint
(
*
m_pWindow
,
m_aPaintRect
);
// double-buffering - so far an experimental feature
if
(
officecfg
::
Office
::
Common
::
Misc
::
ExperimentalMode
::
get
())
{
ScopedVclPtrInstance
<
VirtualDevice
>
pDevice
;
// transfer various settings
// FIXME: this must disappear as we move to RenderContext only,
// the painting must become state-less, so that no actual
// vcl::Window setting affects this
pDevice
->
SetBackground
(
m_pWindow
->
GetBackground
());
pDevice
->
SetClipRegion
(
m_pWindow
->
GetClipRegion
());
pDevice
->
SetFillColor
(
m_pWindow
->
GetFillColor
());
pDevice
->
SetFont
(
m_pWindow
->
GetFont
());
pDevice
->
SetLineColor
(
m_pWindow
->
GetLineColor
());
pDevice
->
SetMapMode
(
m_pWindow
->
GetMapMode
());
pDevice
->
SetRefPoint
(
m_pWindow
->
GetRefPoint
());
pDevice
->
SetSettings
(
m_pWindow
->
GetSettings
());
// update the output size now, after all the settings were copied
pDevice
->
SetOutputSize
(
m_pWindow
->
GetOutputSize
());
// copy the underlying content to be able to handle trasparency
pDevice
->
DrawOutDev
(
m_aPaintRect
.
TopLeft
(),
m_aPaintRect
.
GetSize
(),
m_aPaintRect
.
TopLeft
(),
m_aPaintRect
.
GetSize
(),
*
m_pWindow
);
// paint to the VirtualDevice first
m_pWindow
->
Paint
(
*
pDevice
.
get
(),
m_aPaintRect
);
// debugging of the areas - show where we are painting
// export VCL_DOUBLEBUFFERING_REGIONS=1 to see where are we
// painting
if
(
getenv
(
"VCL_DOUBLEBUFFERING_DEBUG"
))
{
Rectangle
aTestRect
(
m_aPaintRect
);
aTestRect
.
Right
()
-=
1
;
aTestRect
.
Bottom
()
-=
1
;
pDevice
->
SetLineColor
(
Color
(
COL_LIGHTRED
));
pDevice
->
SetFillColor
();
pDevice
->
DrawRect
(
aTestRect
);
pDevice
->
SetFillColor
(
Color
(
COL_LIGHTRED
));
aTestRect
=
Rectangle
(
m_aPaintRect
.
TopLeft
(),
Size
(
10
,
10
));
pDevice
->
DrawRect
(
aTestRect
);
aTestRect
=
Rectangle
(
Point
(
m_aPaintRect
.
Right
()
-
10
,
m_aPaintRect
.
Top
()),
Size
(
10
,
10
));
pDevice
->
DrawRect
(
aTestRect
);
aTestRect
=
Rectangle
(
Point
(
m_aPaintRect
.
Right
()
-
10
,
m_aPaintRect
.
Bottom
()
-
10
),
Size
(
10
,
10
));
pDevice
->
DrawRect
(
aTestRect
);
aTestRect
=
Rectangle
(
Point
(
m_aPaintRect
.
Left
(),
m_aPaintRect
.
Bottom
()
-
10
),
Size
(
10
,
10
));
pDevice
->
DrawRect
(
aTestRect
);
}
// and then copy that to the actual window
// export VCL_DOUBLEBUFFERING_AVOID_PAINT=1 to see where we are
// painting directly instead of using Invalidate()
// [ie. everything you can see was painted directly to the
// window either above or in eg. an event handler]
if
(
!
getenv
(
"VCL_DOUBLEBUFFERING_AVOID_PAINT"
))
m_pWindow
->
DrawOutDev
(
m_aPaintRect
.
TopLeft
(),
m_aPaintRect
.
GetSize
(),
m_aPaintRect
.
TopLeft
(),
m_aPaintRect
.
GetSize
(),
*
pDevice
.
get
());
}
else
{
// direct painting
m_pWindow
->
Paint
(
*
m_pWindow
,
m_aPaintRect
);
}
m_pWindow
->
EndPaint
();
m_pWindow
->
EndPaint
();
}
}
}
}
...
...
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