Changeset 94876 in webkit
- Timestamp:
- Sep 9, 2011 3:06:03 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r94866 r94876 1 2011-09-09 Rafael Antognolli <antognolli@profusion.mobi> 2 3 Add replacement functions for gdk ones. 4 https://bugs.webkit.org/show_bug.cgi?id=66323 5 6 Reviewed by Martin Robinson. 7 8 * Source/cmake/FindPango.cmake: 9 1 10 2011-09-09 Laszlo Gombos <laszlo.1.gombos@nokia.com> 2 11 -
trunk/Source/WebCore/CMakeListsEfl.txt
r91914 r94876 129 129 platform/graphics/pango/GlyphPageTreeNodePango.cpp 130 130 platform/graphics/pango/SimpleFontDataPango.cpp 131 platform/graphics/pango/PangoUtilities.cpp 131 132 ) 132 133 LIST(APPEND WebCore_LIBRARIES 133 ${Pango_LIBRARIES} 134 ${Pango_LIBRARY} 135 ${Pango_Cairo_LIBRARY} 134 136 ) 135 137 ENDIF () -
trunk/Source/WebCore/ChangeLog
r94875 r94876 1 2011-09-09 Rafael Antognolli <antognolli@profusion.mobi> 2 3 Add replacement functions for gdk ones. 4 https://bugs.webkit.org/show_bug.cgi?id=66323 5 6 Reviewed by Martin Robinson. 7 8 This will allow the EFL port to don't depend on gdk anymore. 9 10 No new functionality so no new tests. 11 12 * CMakeListsEfl.txt: 13 * platform/graphics/cairo/CairoUtilities.cpp: 14 (WebCore::appendRegionToCairoContext): 15 * platform/graphics/cairo/CairoUtilities.h: 16 * platform/graphics/pango/FontPango.cpp: 17 (WebCore::drawGlyphsShadow): 18 (WebCore::Font::drawComplexText): 19 * platform/graphics/pango/PangoUtilities.cpp: Added. 20 (WebCore::getLineClipRegionFromLayoutIter): 21 (WebCore::getClipRegionFromPangoLayoutLine): 22 * platform/graphics/pango/PangoUtilities.h: Added. 23 1 24 2011-09-09 Mark Hahnenberg <mhahnenberg@apple.com> 2 25 -
trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp
r89442 r94876 1 1 /* 2 2 * Copyright (C) 2010 Igalia S.L. 3 * Copyright (C) 2011 ProFUSION embedded systems 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 79 80 { 80 81 appendPathToCairoContext(context, path.platformPath()->context()); 82 } 83 84 void appendRegionToCairoContext(cairo_t* to, const cairo_region_t* region) 85 { 86 if (!region) 87 return; 88 89 const int rectCount = cairo_region_num_rectangles(region); 90 for (int i = 0; i < rectCount; ++i) { 91 cairo_rectangle_int_t rect; 92 cairo_region_get_rectangle(region, i, &rect); 93 cairo_rectangle(to, rect.x, rect.y, rect.width, rect.height); 94 } 81 95 } 82 96 -
trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.h
r89442 r94876 1 1 /* 2 2 * Copyright (C) 2010 Igalia S.L. 3 * Copyright (C) 2011 ProFUSION embedded systems 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 44 45 void setPathOnCairoContext(cairo_t* to, cairo_t* from); 45 46 void appendWebCorePathToCairoContext(cairo_t* context, const Path& path); 47 void appendRegionToCairoContext(cairo_t*, const cairo_region_t*); 46 48 cairo_operator_t toCairoOperator(CompositeOperator op); 47 49 void drawPatternToCairoContext(cairo_t* cr, cairo_surface_t* image, const IntSize& imageSize, const FloatRect& tileRect, -
trunk/Source/WebCore/platform/graphics/pango/FontPango.cpp
r94874 r94876 7 7 * Copyright (C) 2008 Xan Lopez <xan@gnome.org> 8 8 * Copyright (C) 2008 Nuanti Ltd. 9 * Copyright (C) 2011 ProFUSION embedded systems 9 10 * All rights reserved. 10 11 * … … 43 44 #include "TextRun.h" 44 45 #include <cairo.h> 45 #include <gdk/gdk.h>46 46 #include <pango/pango.h> 47 47 #include <pango/pangocairo.h> 48 49 #if PLATFORM(GTK) 50 #include <gdk/gdk.h> 51 #else 52 #include "PangoUtilities.h" 53 #endif 48 54 49 55 #if USE(FREETYPE) … … 235 241 236 242 setSourceRGBAFromColor(context, graphicsContext->state().shadowColor); 243 #if PLATFORM(GTK) 237 244 gdk_cairo_region(context, renderRegion); 245 #else 246 appendRegionToCairoContext(context, renderRegion); 247 #endif 238 248 cairo_clip(context); 239 249 pango_cairo_show_layout_line(context, layoutLine); … … 257 267 cairo_save(context); 258 268 cairo_translate(context, totalOffset.x(), totalOffset.y()); 269 #if PLATFORM(GTK) 259 270 gdk_cairo_region(context, renderRegion); 271 #else 272 appendRegionToCairoContext(context, renderRegion); 273 #endif 260 274 cairo_clip(context); 261 275 cairo_translate(context, -totalOffset.x(), -totalOffset.y()); … … 292 306 char* end = g_utf8_offset_to_pointer(start, to - from); 293 307 int ranges[] = {start - utf8, end - utf8}; 308 #if PLATFORM(GTK) 294 309 partialRegion = gdk_pango_layout_line_get_clip_region(layoutLine, 0, 0, ranges, 1); 310 #else 311 partialRegion = getClipRegionFromPangoLayoutLine(layoutLine, ranges); 312 #endif 295 313 296 314 drawGlyphsShadow(context, point, layoutLine, partialRegion); … … 302 320 context->fillColor().getRGBA(red, green, blue, alpha); 303 321 cairo_set_source_rgba(cr, red, green, blue, alpha); 304 gdk_cairo_region(cr, partialRegion); 322 #if PLATFORM(GTK) 323 gdk_cairo_region(cr, partialRegion); 324 #else 325 appendRegionToCairoContext(cr, partialRegion); 326 #endif 305 327 cairo_clip(cr); 306 328 -
trunk/Source/cmake/FindPango.cmake
r59537 r94876 13 13 # Use pkg-config to get hints about paths 14 14 libfind_pkg_check_modules(Pango_PKGCONF pango) 15 libfind_pkg_check_modules(Pango_Cairo_PKGCONF pango) 15 16 16 17 # Include dir … … 18 19 NAMES pango/pango.h 19 20 PATHS ${Pango_PKGCONF_INCLUDE_DIRS} 21 PATH_SUFFIXES pango-1.0 22 ) 23 24 find_path(Pango_Cairo_INCLUDE_DIR 25 NAMES pango/pangocairo.h 26 PATHS ${Pango_Cairo_PKGCONF_INCLUDE_DIRS} 20 27 PATH_SUFFIXES pango-1.0 21 28 ) … … 27 34 ) 28 35 36 find_library(Pango_Cairo_LIBRARY 37 NAMES pangocairo-1.0 38 PATHS ${Pango_Cairo_PKGCONF_LIBRARY_DIRS} 39 ) 40 29 41 # Set the include dir variables and the libraries and let libfind_process do the rest. 30 42 # NOTE: Singular variables for this library, plural for libraries this this lib depends on.
Note: See TracChangeset
for help on using the changeset viewer.