Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: core/include/fxge/fx_ge.h

Issue 1745243002: Pass rect by const reference in SetClip_Rect(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: LTBR. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fxge/fx_ge.h
diff --git a/core/include/fxge/fx_ge.h b/core/include/fxge/fx_ge.h
index ebcdea1483c935d8540411c35b20bd4f116fdca2..c5d409c41cd720b2e2a99fe1abeab630d97de0e6 100644
--- a/core/include/fxge/fx_ge.h
+++ b/core/include/fxge/fx_ge.h
@@ -239,36 +239,26 @@ typedef struct {
FX_DWORD m_ExtGID;
FX_BOOL m_bFontStyle;
} FXTEXT_CHARPOS;
+
class CFX_RenderDevice {
public:
CFX_RenderDevice();
-
virtual ~CFX_RenderDevice();
void SetDeviceDriver(IFX_RenderDeviceDriver* pDriver);
-
IFX_RenderDeviceDriver* GetDeviceDriver() const { return m_pDeviceDriver; }
FX_BOOL StartRendering();
-
void EndRendering();
-
void SaveState();
-
void RestoreState(FX_BOOL bKeepSaved = FALSE);
int GetWidth() const { return m_Width; }
-
int GetHeight() const { return m_Height; }
-
int GetDeviceClass() const { return m_DeviceClass; }
-
int GetBPP() const { return m_bpp; }
-
int GetRenderCaps() const { return m_RenderCaps; }
-
int GetDeviceCaps(int id) const;
-
CFX_Matrix GetCTM() const;
CFX_DIBitmap* GetBitmap() const { return m_pBitmap; }
@@ -284,8 +274,7 @@ class CFX_RenderDevice {
const CFX_Matrix* pObject2Device,
int fill_mode);
- FX_BOOL SetClip_Rect(const FX_RECT* pRect);
-
+ FX_BOOL SetClip_Rect(const FX_RECT& pRect);
FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData,
const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState);
@@ -405,28 +394,19 @@ class CFX_RenderDevice {
virtual void End() {}
private:
- CFX_DIBitmap* m_pBitmap;
+ void InitDeviceInfo();
+ void UpdateClipBox();
+ CFX_DIBitmap* m_pBitmap;
int m_Width;
-
int m_Height;
-
int m_bpp;
-
int m_RenderCaps;
-
int m_DeviceClass;
-
FX_RECT m_ClipBox;
-
- protected:
IFX_RenderDeviceDriver* m_pDeviceDriver;
-
- private:
- void InitDeviceInfo();
-
- void UpdateClipBox();
};
+
class CFX_FxgeDevice : public CFX_RenderDevice {
public:
CFX_FxgeDevice();
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698