Summary: | [Win][Direct2D] Add initial Pattern handling implementation | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> | ||||
Component: | WebCore Misc. | Assignee: | Brent Fulgham <bfulgham> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | achristensen, bfulgham, dino, pvollan, simon.fraser | ||||
Priority: | P2 | ||||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Brent Fulgham
2016-10-10 22:57:14 PDT
Created attachment 291233 [details]
Patch
Comment on attachment 291233 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=291233&action=review > Source/WebCore/platform/graphics/GraphicsContext.h:561 > + ID2D1Brush* solidStrokeBrush(); > + ID2D1Brush* solidFillBrush(); > + ID2D1Brush* patternStrokeBrush(); > + ID2D1Brush* patternFillBrush(); Can these be const? Comment on attachment 291233 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=291233&action=review > Source/WebCore/platform/graphics/win/PatternDirect2D.cpp:58 > + HRESULT hr = renderTarget->CreateBitmapBrush(tileImage()->nativeImage().get(), &bitmapBrushProperties, &brushProperties, &patternBrush); > + ASSERT(hr); > + return patternBrush; What's the ownership model here? Does the caller need to release or destroy the brush? Can we use smart pointers to make this easier? Comment on attachment 291233 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=291233&action=review >> Source/WebCore/platform/graphics/GraphicsContext.h:561 >> + ID2D1Brush* patternFillBrush(); > > Can these be const? Yes. I'll fix them. >> Source/WebCore/platform/graphics/win/PatternDirect2D.cpp:58 >> + return patternBrush; > > What's the ownership model here? Does the caller need to release or destroy the brush? Can we use smart pointers to make this easier? You are right -- I should be using the adoptCOM utility function. Committed r207140: <http://trac.webkit.org/changeset/207140> |