vcl/unx/gtk/window/gtksalframe.cxx | 45 +++----------------------- vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 6 +++ 2 files changed, 12 insertions(+), 39 deletions(-)
New commits: commit 5a009a4387a84a36d2e3418c7e7b097cb10c3f5a Author: Caolán McNamara <caol...@redhat.com> Date: Wed Mar 4 14:59:41 2015 +0000 consistent use of [pop|push]IgnoreDamage Change-Id: I9a1fccc2cb9f2cd2f336218cf336c358c1a87af1 diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 83526a1..df53136 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -3444,7 +3444,7 @@ gboolean GtkSalFrame::signalDraw( GtkWidget*, cairo_t *cr, gpointer frame ) // FIXME: we quite probably want to stop re-rendering of pieces // that we know are just damaged by us and hence already re-rendered - pThis->m_nDuringRender++; + pThis->pushIgnoreDamage(); // FIXME: we need to profile whether re-rendering the entire // clip region, and just pushing (with renderArea) smaller pieces @@ -3460,7 +3460,7 @@ gboolean GtkSalFrame::signalDraw( GtkWidget*, cairo_t *cr, gpointer frame ) pThis->renderArea( cr, &rect ); } - pThis->m_nDuringRender--; + pThis->popIgnoreDamage(); cairo_surface_flush(cairo_get_target(cr)); commit 19af4b899eb51631a1b16e53cd32adf697a10284 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Mar 4 14:28:44 2015 +0000 update comment Change-Id: I0f1579be12de198dfbc90c7c78c14979d120302d diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 937b058..83526a1 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -3401,9 +3401,7 @@ void GtkSalFrame::damaged (const basegfx::B2IBox& rDamageRect) } #if GTK_CHECK_VERSION(3,0,0) -// FIXME: This is incredibly lame ... but so is cairo's insistence on -exactly- -// its own stride - neither more nor less - particularly not more aligned -// we like 8byte aligned, it likes 4 - most odd. +// blit our backing basebmp buffer to the target cairo context cr void GtkSalFrame::renderArea( cairo_t *cr, cairo_rectangle_t *area ) { cairo_save( cr ); commit a1778a4b4551102d6319a77238196a6822b84187 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Mar 4 14:27:05 2015 +0000 seeing as we're using cairo-calls now we shouldn't need manual bounds checking Change-Id: Id0b91600e69819bc158bda6c51d35169936299d0 diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 93cfdbb..937b058 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -3406,45 +3406,14 @@ void GtkSalFrame::damaged (const basegfx::B2IBox& rDamageRect) // we like 8byte aligned, it likes 4 - most odd. void GtkSalFrame::renderArea( cairo_t *cr, cairo_rectangle_t *area ) { - if( !m_aFrame.get() ) - return; - - basebmp::RawMemorySharedArray data = m_aFrame->getBuffer(); - basegfx::B2IVector size = m_aFrame->getSize(); - - long ax = area->x; - long ay = area->y; - long awidth = area->width; - long aheight = area->height; - - // Sanity check bounds - we get some odd things here. - if( ax >= size.getX() ) - ax = size.getX() - 1; - if( ay >= size.getY() ) - ay = size.getY() - 1; - if( ax < 0 ) - { - ax = 0; - awidth += ax; - } - if( ay < 0 ) - { - ay = 0; - aheight += ay; - } - if( ax + awidth > size.getX() ) - awidth = size.getX() - ax; - if( ay + aheight > size.getY() ) - aheight = size.getY() - ay; - cairo_save( cr ); cairo_surface_t *pSurface = cairo_get_target(getCairoContext()); - cairo_set_operator( cr, CAIRO_OPERATOR_OVER ); cairo_set_source_surface( cr, pSurface, 0, 0 ); - cairo_rectangle( cr, ax, ay, awidth, aheight ); + cairo_rectangle( cr, area->x, area->y, area->width, area->height ); cairo_fill( cr ); + cairo_restore( cr ); // Render red rectangles to show what was re-rendered ... @@ -3453,7 +3422,7 @@ void GtkSalFrame::renderArea( cairo_t *cr, cairo_rectangle_t *area ) cairo_save( cr ); cairo_set_line_width( cr, 1.0 ); cairo_set_source_rgb( cr, 1.0, 0, 0 ); - cairo_rectangle( cr, ax + 1.0, ay + 1.0, awidth - 2.0, aheight - 2.0 ); + cairo_rectangle( cr, area->x + 1.0, area->y + 1.0, area->width - 2.0, area->height - 2.0 ); cairo_stroke( cr ); cairo_restore( cr ); } commit 8a21cb8a80a1edf36644b4fd3be3220f3df48021 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Mar 4 14:16:51 2015 +0000 silence some more spew Change-Id: Icfab4fc0208de28783ca50328321f3c65600bd9d diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx index 1f4f3a8..8ca34ad 100644 --- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx @@ -1300,12 +1300,18 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) } aInfo.m_eWidth = WIDTH_ULTRA_CONDENSED; +#if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "font name BEFORE system match: \"%s\"\n", aFamily.getStr() ); +#endif + // match font to e.g. resolve "Sans" psp::PrintFontManager::get().matchFont( aInfo, rSettings.GetUILanguageTag().getLocale() ); + +#if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "font match %s, name AFTER: \"%s\"\n", aInfo.m_nID != 0 ? "succeeded" : "failed", OUStringToOString( aInfo.m_aFamilyName, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); +#endif int nPointHeight = 0; /*sal_Int32 nDispDPIY = GetDisplay()->GetResolution().B();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits