summaryrefslogtreecommitdiff
path: root/core/fxge/win32/win32_int.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2017-03-28 15:47:47 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-03-28 15:48:01 +0000
commit31b08d4cdaa17d7a03f35e087096a77036af98ec (patch)
tree40234b81f2972c857a33a86cb4b59868e56bb86b /core/fxge/win32/win32_int.h
parenta3e9bf66c3483db926602aa62b0bd1ff8d1357a1 (diff)
downloadpdfium-31b08d4cdaa17d7a03f35e087096a77036af98ec.tar.xz
Revert "Refcount all CFX_DIBSources (and subclasses) all the time."
This reverts commit 0004f29bf6ee3c6060a272c79f14993e92e053c7. Reason for revert: Breaks build with skia_paths enabled (which will break the chrome roll). ../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:1858:38: error: no member named 'get' in 'CFX_RetainPtr<CFX_DIBitmap>' ../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:1861:42: error: no member named 'get' in 'CFX_RetainPtr<CFX_DIBitmap>' ../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:2987:15: error: no viable overloaded '=' ../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:2991:18: error: no viable overloaded '=' ../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:2999:17: error: no viable overloaded '=' ../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:3001:43: error: no member named 'GetObject' in 'CFX_RetainPtr<CFX_DIBitmap>' Original change's description: > Refcount all CFX_DIBSources (and subclasses) all the time. > > There are currently several ownership models for these objects, > including ad-hoc logic for sharing and deletion, and the > now-redundant CFX_DIBitmapRef externally-counted handle to the DIBs. > > Replace them all with the internal refcount scheme. > > Change-Id: I2db399dfc19219eda384f94cc989353b78ce2872 > Reviewed-on: https://pdfium-review.googlesource.com/3166 > Reviewed-by: dsinclair <dsinclair@chromium.org> > Commit-Queue: dsinclair <dsinclair@chromium.org> > TBR=thestig@chromium.org,tsepez@chromium.org,dsinclair@chromium.org,pdfium-reviews@googlegroups.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I678b1fbc5e666cf7a19372ebaff3270fb115ba5e Reviewed-on: https://pdfium-review.googlesource.com/3243 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxge/win32/win32_int.h')
-rw-r--r--core/fxge/win32/win32_int.h39
1 files changed, 18 insertions, 21 deletions
diff --git a/core/fxge/win32/win32_int.h b/core/fxge/win32/win32_int.h
index 35521d0096..54ea3716e1 100644
--- a/core/fxge/win32/win32_int.h
+++ b/core/fxge/win32/win32_int.h
@@ -34,7 +34,7 @@ class CGdiplusExt {
bool IsAvailable() { return !!m_hModule; }
bool StretchBitMask(HDC hDC,
BOOL bMonoDevice,
- const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
+ const CFX_DIBitmap* pBitmap,
int dest_left,
int dest_top,
int dest_width,
@@ -43,7 +43,7 @@ class CGdiplusExt {
const FX_RECT* pClipRect,
int flags);
bool StretchDIBits(HDC hDC,
- const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
+ const CFX_DIBitmap* pBitmap,
int dest_left,
int dest_top,
int dest_width,
@@ -96,8 +96,7 @@ class CGdiplusExt {
float font_size,
int fontstyle);
void GdipDeleteFont(void* pFont);
- bool GdipCreateBitmap(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
- void** bitmap);
+ bool GdipCreateBitmap(CFX_DIBitmap* pBitmap, void** bitmap);
void GdipDisposeImage(void* bitmap);
void GdipGetFontSize(void* pFont, float* size);
void* GdiAddFontMemResourceEx(void* pFontdata,
@@ -105,7 +104,7 @@ class CGdiplusExt {
void* pdv,
uint32_t* num_face);
bool GdiRemoveFontMemResourceEx(void* handle);
- CFX_RetainPtr<CFX_DIBitmap> LoadDIBitmap(WINDIB_Open_Args_ args);
+ CFX_DIBitmap* LoadDIBitmap(WINDIB_Open_Args_ args);
FARPROC m_Functions[100];
FuncType_GdiAddFontMemResourceEx m_pGdiAddFontMemResourceEx;
@@ -159,17 +158,17 @@ class CGdiDeviceDriver : public IFX_RenderDeviceDriver {
void DrawLine(float x1, float y1, float x2, float y2);
- bool GDI_SetDIBits(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
+ bool GDI_SetDIBits(CFX_DIBitmap* pBitmap,
const FX_RECT* pSrcRect,
int left,
int top);
- bool GDI_StretchDIBits(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
+ bool GDI_StretchDIBits(CFX_DIBitmap* pBitmap,
int dest_left,
int dest_top,
int dest_width,
int dest_height,
uint32_t flags);
- bool GDI_StretchBitMask(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
+ bool GDI_StretchBitMask(CFX_DIBitmap* pBitmap,
int dest_left,
int dest_top,
int dest_width,
@@ -192,16 +191,14 @@ class CGdiDisplayDriver : public CGdiDeviceDriver {
~CGdiDisplayDriver() override;
protected:
- bool GetDIBits(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
- int left,
- int top) override;
- bool SetDIBits(const CFX_RetainPtr<CFX_DIBSource>& pBitmap,
+ bool GetDIBits(CFX_DIBitmap* pBitmap, int left, int top) override;
+ bool SetDIBits(const CFX_DIBSource* pBitmap,
uint32_t color,
const FX_RECT* pSrcRect,
int left,
int top,
int blend_type) override;
- bool StretchDIBits(const CFX_RetainPtr<CFX_DIBSource>& pBitmap,
+ bool StretchDIBits(const CFX_DIBSource* pBitmap,
uint32_t color,
int dest_left,
int dest_top,
@@ -210,14 +207,14 @@ class CGdiDisplayDriver : public CGdiDeviceDriver {
const FX_RECT* pClipRect,
uint32_t flags,
int blend_type) override;
- bool StartDIBits(const CFX_RetainPtr<CFX_DIBSource>& pBitmap,
+ bool StartDIBits(const CFX_DIBSource* pBitmap,
int bitmap_alpha,
uint32_t color,
const CFX_Matrix* pMatrix,
uint32_t render_flags,
void*& handle,
int blend_type) override;
- bool UseFoxitStretchEngine(const CFX_RetainPtr<CFX_DIBSource>& pSource,
+ bool UseFoxitStretchEngine(const CFX_DIBSource* pSource,
uint32_t color,
int dest_left,
int dest_top,
@@ -234,13 +231,13 @@ class CGdiPrinterDriver : public CGdiDeviceDriver {
protected:
int GetDeviceCaps(int caps_id) const override;
- bool SetDIBits(const CFX_RetainPtr<CFX_DIBSource>& pBitmap,
+ bool SetDIBits(const CFX_DIBSource* pBitmap,
uint32_t color,
const FX_RECT* pSrcRect,
int left,
int top,
int blend_type) override;
- bool StretchDIBits(const CFX_RetainPtr<CFX_DIBSource>& pBitmap,
+ bool StretchDIBits(const CFX_DIBSource* pBitmap,
uint32_t color,
int dest_left,
int dest_top,
@@ -249,7 +246,7 @@ class CGdiPrinterDriver : public CGdiDeviceDriver {
const FX_RECT* pClipRect,
uint32_t flags,
int blend_type) override;
- bool StartDIBits(const CFX_RetainPtr<CFX_DIBSource>& pBitmap,
+ bool StartDIBits(const CFX_DIBSource* pBitmap,
int bitmap_alpha,
uint32_t color,
const CFX_Matrix* pMatrix,
@@ -293,13 +290,13 @@ class CPSPrinterDriver : public IFX_RenderDeviceDriver {
int fill_mode,
int blend_type) override;
bool GetClipBox(FX_RECT* pRect) override;
- bool SetDIBits(const CFX_RetainPtr<CFX_DIBSource>& pBitmap,
+ bool SetDIBits(const CFX_DIBSource* pBitmap,
uint32_t color,
const FX_RECT* pSrcRect,
int left,
int top,
int blend_type) override;
- bool StretchDIBits(const CFX_RetainPtr<CFX_DIBSource>& pBitmap,
+ bool StretchDIBits(const CFX_DIBSource* pBitmap,
uint32_t color,
int dest_left,
int dest_top,
@@ -308,7 +305,7 @@ class CPSPrinterDriver : public IFX_RenderDeviceDriver {
const FX_RECT* pClipRect,
uint32_t flags,
int blend_type) override;
- bool StartDIBits(const CFX_RetainPtr<CFX_DIBSource>& pBitmap,
+ bool StartDIBits(const CFX_DIBSource* pBitmap,
int bitmap_alpha,
uint32_t color,
const CFX_Matrix* pMatrix,