Changeset 225775 in webkit
- Timestamp:
- Dec 11, 2017, 11:06:16 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r225774 r225775 1 2017-12-11 Zan Dobersek <zdobersek@igalia.com> 2 3 [Cairo] Cairo::clipToImageBuffer() should operate on a cairo_surface_t 4 https://bugs.webkit.org/show_bug.cgi?id=180665 5 6 Reviewed by Michael Catanzaro. 7 8 Have the Cairo::clipToImageBuffer() function in the CairoUtilities code 9 operate on a cairo_surface_t object, instead of an Image object. 10 11 Call site in GraphicsContext::clipToImageBuffer() is adjusted to first 12 ensure a non-null Image object, and then retrieve a cairo_surface_t 13 object from that, passing it on to Cairo::clipToImageBuffer(). 14 15 No new tests -- no change in functionality. 16 17 * platform/graphics/cairo/CairoOperations.cpp: 18 (WebCore::Cairo::clipToImageBuffer): 19 * platform/graphics/cairo/CairoOperations.h: 20 * platform/graphics/cairo/GraphicsContextCairo.cpp: 21 (WebCore::GraphicsContext::clipToImageBuffer): 22 1 23 2017-12-11 Zan Dobersek <zdobersek@igalia.com> 2 24 -
trunk/Source/WebCore/platform/graphics/cairo/CairoOperations.cpp
r225091 r225775 1005 1005 } 1006 1006 1007 void clipToImageBuffer(PlatformContextCairo& platformContext, Image& image, const FloatRect& destRect) 1008 { 1009 RefPtr<cairo_surface_t> surface = image.nativeImageForCurrentFrame(); 1010 if (surface) 1011 platformContext.pushImageMask(surface.get(), destRect); 1007 void clipToImageBuffer(PlatformContextCairo& platformContext, cairo_surface_t* image, const FloatRect& destRect) 1008 { 1009 platformContext.pushImageMask(image, destRect); 1012 1010 } 1013 1011 -
trunk/Source/WebCore/platform/graphics/cairo/CairoOperations.h
r225077 r225775 48 48 class FloatSize; 49 49 class GraphicsContext; 50 class Image;51 50 class Path; 52 51 class PlatformContextCairo; … … 124 123 void clipPath(PlatformContextCairo&, const Path&, WindRule); 125 124 126 void clipToImageBuffer(PlatformContextCairo&, Image&, const FloatRect&);125 void clipToImageBuffer(PlatformContextCairo&, cairo_surface_t*, const FloatRect&); 127 126 128 127 } // namespace Cairo -
trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
r225077 r225775 268 268 269 269 RefPtr<Image> image = buffer.copyImage(DontCopyBackingStore); 270 271 ASSERT(hasPlatformContext()); 272 Cairo::clipToImageBuffer(*platformContext(), *image, destRect); 270 if (!image) 271 return; 272 273 ASSERT(hasPlatformContext()); 274 if (auto surface = image->nativeImageForCurrentFrame()) 275 Cairo::clipToImageBuffer(*platformContext(), surface.get(), destRect); 273 276 } 274 277
Note:
See TracChangeset
for help on using the changeset viewer.