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/SkIStream.cpp b/src/utils/win/SkIStream.cpp
index 3e10209..e19128b 100644
--- a/src/utils/win/SkIStream.cpp
+++ b/src/utils/win/SkIStream.cpp
@@ -17,9 +17,7 @@
 SkBaseIStream::SkBaseIStream() : _refcount(1) { }
 SkBaseIStream::~SkBaseIStream() { }
 
-HRESULT STDMETHODCALLTYPE SkBaseIStream::QueryInterface(REFIID iid
-                                                      , void ** ppvObject)
-{
+SK_STDMETHODIMP SkBaseIStream::QueryInterface(REFIID iid, void ** ppvObject) {
     if (nullptr == ppvObject) {
         return E_INVALIDARG;
     }
@@ -36,11 +34,11 @@
     }
 }
 
-ULONG STDMETHODCALLTYPE SkBaseIStream::AddRef(void) {
+SK_STDMETHODIMP_(ULONG) SkBaseIStream::AddRef() {
     return (ULONG)InterlockedIncrement(&_refcount);
 }
 
-ULONG STDMETHODCALLTYPE SkBaseIStream::Release(void) {
+SK_STDMETHODIMP_(ULONG) SkBaseIStream::Release() {
     ULONG res = (ULONG) InterlockedDecrement(&_refcount);
     if (0 == res) {
         delete this;
@@ -49,52 +47,40 @@
 }
 
 // ISequentialStream Interface
-HRESULT STDMETHODCALLTYPE SkBaseIStream::Read(void* pv
-                                            , ULONG cb
-                                            , ULONG* pcbRead)
+SK_STDMETHODIMP SkBaseIStream::Read(void* pv, ULONG cb, ULONG* pcbRead)
 { return E_NOTIMPL; }
 
-HRESULT STDMETHODCALLTYPE SkBaseIStream::Write(void const* pv
-                                             , ULONG cb
-                                             , ULONG* pcbWritten)
+SK_STDMETHODIMP SkBaseIStream::Write(void const* pv, ULONG cb, ULONG* pcbWritten)
 { return E_NOTIMPL; }
 
 // IStream Interface
-HRESULT STDMETHODCALLTYPE SkBaseIStream::SetSize(ULARGE_INTEGER)
+SK_STDMETHODIMP SkBaseIStream::SetSize(ULARGE_INTEGER)
 { return E_NOTIMPL; }
 
-HRESULT STDMETHODCALLTYPE SkBaseIStream::CopyTo(IStream*
-                                              , ULARGE_INTEGER
-                                              , ULARGE_INTEGER*
-                                              , ULARGE_INTEGER*)
+SK_STDMETHODIMP SkBaseIStream::CopyTo(IStream*, ULARGE_INTEGER, ULARGE_INTEGER*, ULARGE_INTEGER*)
 { return E_NOTIMPL; }
 
-HRESULT STDMETHODCALLTYPE SkBaseIStream::Commit(DWORD)
+SK_STDMETHODIMP SkBaseIStream::Commit(DWORD)
 { return E_NOTIMPL; }
 
-HRESULT STDMETHODCALLTYPE SkBaseIStream::Revert(void)
+SK_STDMETHODIMP SkBaseIStream::Revert()
 { return E_NOTIMPL; }
 
-HRESULT STDMETHODCALLTYPE SkBaseIStream::LockRegion(ULARGE_INTEGER
-                                                  , ULARGE_INTEGER
-                                                  , DWORD)
+SK_STDMETHODIMP SkBaseIStream::LockRegion(ULARGE_INTEGER, ULARGE_INTEGER, DWORD)
 { return E_NOTIMPL; }
 
-HRESULT STDMETHODCALLTYPE SkBaseIStream::UnlockRegion(ULARGE_INTEGER
-                                                    , ULARGE_INTEGER
-                                                    , DWORD)
+SK_STDMETHODIMP SkBaseIStream::UnlockRegion(ULARGE_INTEGER, ULARGE_INTEGER, DWORD)
 { return E_NOTIMPL; }
 
-HRESULT STDMETHODCALLTYPE SkBaseIStream::Clone(IStream **)
+SK_STDMETHODIMP SkBaseIStream::Clone(IStream**)
 { return E_NOTIMPL; }
 
-HRESULT STDMETHODCALLTYPE SkBaseIStream::Seek(LARGE_INTEGER liDistanceToMove
-                                            , DWORD dwOrigin
-                                            , ULARGE_INTEGER* lpNewFilePointer)
+SK_STDMETHODIMP SkBaseIStream::Seek(LARGE_INTEGER liDistanceToMove,
+                                    DWORD dwOrigin,
+                                    ULARGE_INTEGER* lpNewFilePointer)
 { return E_NOTIMPL; }
 
-HRESULT STDMETHODCALLTYPE SkBaseIStream::Stat(STATSTG* pStatstg
-                                            , DWORD grfStatFlag)
+SK_STDMETHODIMP SkBaseIStream::Stat(STATSTG* pStatstg, DWORD grfStatFlag)
 { return E_NOTIMPL; }
 
 
@@ -116,10 +102,7 @@
     }
 }
 
-HRESULT SkIStream::CreateFromSkStream(SkStream* stream
-                                    , bool deleteOnRelease
-                                    , IStream ** ppStream)
-{
+HRESULT SkIStream::CreateFromSkStream(SkStream* stream, bool deleteOnRelease, IStream ** ppStream) {
     if (nullptr == stream) {
         return E_INVALIDARG;
     }
@@ -128,23 +111,20 @@
 }
 
 // ISequentialStream Interface
-HRESULT STDMETHODCALLTYPE SkIStream::Read(void* pv, ULONG cb, ULONG* pcbRead) {
+SK_STDMETHODIMP SkIStream::Read(void* pv, ULONG cb, ULONG* pcbRead) {
     *pcbRead = static_cast<ULONG>(this->fSkStream->read(pv, cb));
     this->fLocation.QuadPart += *pcbRead;
     return (*pcbRead == cb) ? S_OK : S_FALSE;
 }
 
-HRESULT STDMETHODCALLTYPE SkIStream::Write(void const* pv
-                                         , ULONG cb
-                                         , ULONG* pcbWritten)
-{
+SK_STDMETHODIMP SkIStream::Write(void const* pv, ULONG cb, ULONG* pcbWritten) {
     return STG_E_CANTSAVE;
 }
 
 // IStream Interface
-HRESULT STDMETHODCALLTYPE SkIStream::Seek(LARGE_INTEGER liDistanceToMove
-                                        , DWORD dwOrigin
-                                        , ULARGE_INTEGER* lpNewFilePointer)
+SK_STDMETHODIMP SkIStream::Seek(LARGE_INTEGER liDistanceToMove,
+                                DWORD dwOrigin,
+                                ULARGE_INTEGER* lpNewFilePointer)
 {
     HRESULT hr = S_OK;
 
@@ -198,9 +178,7 @@
     return hr;
 }
 
-HRESULT STDMETHODCALLTYPE SkIStream::Stat(STATSTG* pStatstg
-                                        , DWORD grfStatFlag)
-{
+SK_STDMETHODIMP SkIStream::Stat(STATSTG* pStatstg, DWORD grfStatFlag) {
     if (0 == (grfStatFlag & STATFLAG_NONAME)) {
         return STG_E_INVALIDFLAG;
     }
@@ -229,18 +207,13 @@
     }
 }
 
-HRESULT SkWIStream::CreateFromSkWStream(SkWStream* stream
-                                      , IStream ** ppStream)
-{
+HRESULT SkWIStream::CreateFromSkWStream(SkWStream* stream, IStream ** ppStream) {
     *ppStream = new SkWIStream(stream);
     return S_OK;
 }
 
 // ISequentialStream Interface
-HRESULT STDMETHODCALLTYPE SkWIStream::Write(void const* pv
-                                          , ULONG cb
-                                          , ULONG* pcbWritten)
-{
+SK_STDMETHODIMP SkWIStream::Write(void const* pv, ULONG cb, ULONG* pcbWritten) {
     HRESULT hr = S_OK;
     bool wrote = this->fSkWStream->write(pv, cb);
     if (wrote) {
@@ -253,14 +226,12 @@
 }
 
 // IStream Interface
-HRESULT STDMETHODCALLTYPE SkWIStream::Commit(DWORD) {
+SK_STDMETHODIMP SkWIStream::Commit(DWORD) {
     this->fSkWStream->flush();
     return S_OK;
 }
 
-HRESULT STDMETHODCALLTYPE SkWIStream::Stat(STATSTG* pStatstg
-                                         , DWORD grfStatFlag)
-{
+SK_STDMETHODIMP SkWIStream::Stat(STATSTG* pStatstg, DWORD grfStatFlag) {
     if (0 == (grfStatFlag & STATFLAG_NONAME)) {
         return STG_E_INVALIDFLAG;
     }