Use COM_DECLSPEC_NOTHROW STDMETHODIMP
Use STDMETHODIMP because it's the right thing to do, use
COM_DECLSPEC_NOTHROW because STDMETHOD uses it but STDMETHODIMP does
not, leading to warnings from clang and maybe also from msvc, see
https://developercommunity.visualstudio.com/content/problem/325764/msvc-1582-generates-warning-c4986-in-atl-header-fi.html
This also removes SkBlockComRef, since even WRL has abandoned the
similar RemoveIUnknown. These classes were helpful in the transition to
using smart pointers, but are incompatible with final implementations.
Change-Id: I53a618ee629af638d9d8625ccd5acb0db6529950
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233988
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
diff --git a/src/utils/win/SkDWriteGeometrySink.h b/src/utils/win/SkDWriteGeometrySink.h
index 30b337f..019539b 100644
--- a/src/utils/win/SkDWriteGeometrySink.h
+++ b/src/utils/win/SkDWriteGeometrySink.h
@@ -9,6 +9,7 @@
#define SkDWriteToPath_DEFINED
#include "include/core/SkTypes.h"
+#include "src/utils/win/SkObjBase.h"
class SkPath;
@@ -20,25 +21,22 @@
LONG fRefCount;
SkPath* fPath;
- SkDWriteGeometrySink(const SkDWriteGeometrySink&);
- SkDWriteGeometrySink& operator=(const SkDWriteGeometrySink&);
-
protected:
explicit SkDWriteGeometrySink(SkPath* path);
virtual ~SkDWriteGeometrySink();
public:
- HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **object) override;
- ULONG STDMETHODCALLTYPE AddRef(void) override;
- ULONG STDMETHODCALLTYPE Release(void) override;
+ SK_STDMETHODIMP QueryInterface(REFIID iid, void **object) override;
+ SK_STDMETHODIMP_(ULONG) AddRef() override;
+ SK_STDMETHODIMP_(ULONG) Release() override;
- void STDMETHODCALLTYPE SetFillMode(D2D1_FILL_MODE fillMode) override;
- void STDMETHODCALLTYPE SetSegmentFlags(D2D1_PATH_SEGMENT vertexFlags) override;
- void STDMETHODCALLTYPE BeginFigure(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin) override;
- void STDMETHODCALLTYPE AddLines(const D2D1_POINT_2F *points, UINT pointsCount) override;
- void STDMETHODCALLTYPE AddBeziers(const D2D1_BEZIER_SEGMENT *beziers, UINT beziersCount) override;
- void STDMETHODCALLTYPE EndFigure(D2D1_FIGURE_END figureEnd) override;
- HRESULT STDMETHODCALLTYPE Close() override;
+ SK_STDMETHODIMP_(void) SetFillMode(D2D1_FILL_MODE fillMode) override;
+ SK_STDMETHODIMP_(void) SetSegmentFlags(D2D1_PATH_SEGMENT vertexFlags) override;
+ SK_STDMETHODIMP_(void) BeginFigure(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin) override;
+ SK_STDMETHODIMP_(void) AddLines(const D2D1_POINT_2F *points, UINT pointsCount) override;
+ SK_STDMETHODIMP_(void) AddBeziers(const D2D1_BEZIER_SEGMENT *beziers, UINT beziersCount) override;
+ SK_STDMETHODIMP_(void) EndFigure(D2D1_FIGURE_END figureEnd) override;
+ SK_STDMETHODIMP Close() override;
static HRESULT Create(SkPath* path, IDWriteGeometrySink** geometryToPath);
};