Bug 1402065 Remove __in and __out from our in-tree copy of pdfium draft
authorTom Ritter <tom@mozilla.com>
Thu, 21 Sep 2017 13:43:56 -0500
changeset 668901 c2ddd93ba3bdddddf39f8075f9c235d9fc75b8ef
parent 668900 1f99068f7e8b196d8c8624f20f2141513bb3ea98
child 668902 54e367ae0a64690404476ad9a9161299f540019c
push id81148
push userbmo:tom@mozilla.com
push dateFri, 22 Sep 2017 05:30:55 +0000
bugs1402065
milestone58.0a1
Bug 1402065 Remove __in and __out from our in-tree copy of pdfium These macros are not used by anything other than Microsoft static analysis tools, but they break the MinGW compile. MinGW cannot define these macros in C++ code, because they conflict with libstdc++ arguement names. See Line 222 of https://sourceforge.net/p/mingw-w64/mingw-w64/ci/cef07470773f3c56e5189125f6b82bf278265e69/tree/mingw-w64-headers/include/sal.h MozReview-Commit-ID: J6LZpy6F3h4
modules/pdfium/pdfium/core/fxge/win32/fx_win32_dwrite.cpp
--- a/modules/pdfium/pdfium/core/fxge/win32/fx_win32_dwrite.cpp
+++ b/modules/pdfium/pdfium/core/fxge/win32/fx_win32_dwrite.cpp
@@ -6,19 +6,19 @@
 
 #include <dwrite.h>
 
 #include "core/fxcrt/fx_system.h"
 #include "core/fxge/ge/cfx_cliprgn.h"
 #include "core/fxge/win32/dwrite_int.h"
 
 typedef HRESULT(__stdcall* FuncType_DWriteCreateFactory)(
-    __in DWRITE_FACTORY_TYPE,
-    __in REFIID,
-    __out IUnknown**);
+    DWRITE_FACTORY_TYPE,
+    REFIID,
+    IUnknown**);
 template <typename InterfaceType>
 inline void SafeRelease(InterfaceType** currentObject) {
   if (*currentObject) {
     (*currentObject)->Release();
     *currentObject = nullptr;
   }
 }
 template <typename InterfaceType>
@@ -109,17 +109,17 @@ class CDwGdiTextRenderer {
   ~CDwGdiTextRenderer();
 
   HRESULT STDMETHODCALLTYPE DrawGlyphRun(const FX_RECT& text_bbox,
                                          __in_opt CFX_ClipRgn* pClipRgn,
                                          __in_opt DWRITE_MATRIX const* pMatrix,
                                          FLOAT baselineOriginX,
                                          FLOAT baselineOriginY,
                                          DWRITE_MEASURING_MODE measuringMode,
-                                         __in DWRITE_GLYPH_RUN const* glyphRun,
+                                         DWRITE_GLYPH_RUN const* glyphRun,
                                          const COLORREF& textColor);
 
  private:
   CFX_DIBitmap* pBitmap_;
   IDWriteBitmapRenderTarget* pRenderTarget_;
   IDWriteRenderingParams* pRenderingParams_;
 };
 
@@ -408,17 +408,17 @@ CDwGdiTextRenderer::~CDwGdiTextRenderer(
 
 STDMETHODIMP CDwGdiTextRenderer::DrawGlyphRun(
     const FX_RECT& text_bbox,
     __in_opt CFX_ClipRgn* pClipRgn,
     __in_opt DWRITE_MATRIX const* pMatrix,
     FLOAT baselineOriginX,
     FLOAT baselineOriginY,
     DWRITE_MEASURING_MODE measuringMode,
-    __in DWRITE_GLYPH_RUN const* glyphRun,
+    DWRITE_GLYPH_RUN const* glyphRun,
     const COLORREF& textColor) {
   HRESULT hr = S_OK;
   if (pMatrix) {
     hr = pRenderTarget_->SetCurrentTransform(pMatrix);
     if (FAILED(hr)) {
       return hr;
     }
   }