Changeset 278323 in webkit
- Timestamp:
- Jun 1, 2021, 1:08:28 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/win/GraphicsContextCairoWin.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r278316 r278323 1 2021-06-01 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 [WinCairo] GraphicsContextCairo::GraphicsContextCairo(HDC, bool) leaks cairo_t 4 https://bugs.webkit.org/show_bug.cgi?id=226317 5 6 Reviewed by Don Olmstead. 7 8 * platform/graphics/win/GraphicsContextCairoWin.cpp: 9 (WebCore::createCairoContextWithHDC): Changed the return type from cairo_t* to RefPtr<cairo_t>. 10 (WebCore::GraphicsContextCairo::GraphicsContextCairo): 11 1 12 2021-06-01 Philippe Normand <pnormand@igalia.com> 2 13 -
trunk/Source/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp
r278149 r278323 31 31 #include "GraphicsContextCairo.h" 32 32 #include "Path.h" 33 #include "RefPtrCairo.h" 33 34 34 35 #include <cairo-win32.h> … … 39 40 40 41 #if PLATFORM(WIN) 41 static cairo_t*createCairoContextWithHDC(HDC hdc, bool hasAlpha)42 static RefPtr<cairo_t> createCairoContextWithHDC(HDC hdc, bool hasAlpha) 42 43 { 43 44 // Put the HDC In advanced mode so it will honor affine transforms. … … 61 62 } 62 63 63 cairo_t* context = cairo_create(surface);64 auto context = adoptRef(cairo_create(surface)); 64 65 cairo_surface_destroy(surface); 65 66 … … 68 69 69 70 GraphicsContextCairo::GraphicsContextCairo(HDC dc, bool hasAlpha) 70 : GraphicsContextCairo(createCairoContextWithHDC(dc, hasAlpha) )71 : GraphicsContextCairo(createCairoContextWithHDC(dc, hasAlpha).get()) 71 72 { 72 73 }
Note:
See TracChangeset
for help on using the changeset viewer.