summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-05-11 16:26:50 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-05-11 20:44:14 +0000
commita5085d45e8288a7ed7af24fc9134d07cbc56e9dc (patch)
treec6594c39a762cc4d663c23424112b55d93abf521 /core/fpdfapi/render
parente6324fa7137fa224daa397464293e0c74e1c68ce (diff)
downloadpdfium-a5085d45e8288a7ed7af24fc9134d07cbc56e9dc.tar.xz
Rename render device classes
This Cl renames the CFX_RenderDevice subclasses to make their usage clearer. Change-Id: Ie820b57df9a3743ce8c6893fb483b398a1f1bdbe Reviewed-on: https://pdfium-review.googlesource.com/5390 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/render')
-rw-r--r--core/fpdfapi/render/cpdf_devicebuffer.cpp2
-rw-r--r--core/fpdfapi/render/cpdf_dibsource.h2
-rw-r--r--core/fpdfapi/render/cpdf_imagerenderer.cpp14
-rw-r--r--core/fpdfapi/render/cpdf_imagerenderer.h6
-rw-r--r--core/fpdfapi/render/cpdf_rendercontext.cpp2
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp16
-rw-r--r--core/fpdfapi/render/cpdf_scaledrenderbuffer.cpp4
-rw-r--r--core/fpdfapi/render/cpdf_scaledrenderbuffer.h4
8 files changed, 25 insertions, 25 deletions
diff --git a/core/fpdfapi/render/cpdf_devicebuffer.cpp b/core/fpdfapi/render/cpdf_devicebuffer.cpp
index 605e09bb5b..be87128a49 100644
--- a/core/fpdfapi/render/cpdf_devicebuffer.cpp
+++ b/core/fpdfapi/render/cpdf_devicebuffer.cpp
@@ -9,7 +9,7 @@
#include "core/fpdfapi/page/cpdf_pageobject.h"
#include "core/fpdfapi/render/cpdf_rendercontext.h"
#include "core/fpdfapi/render/cpdf_renderoptions.h"
-#include "core/fxge/cfx_fxgedevice.h"
+#include "core/fxge/cfx_defaultrenderdevice.h"
#include "core/fxge/cfx_renderdevice.h"
#include "core/fxge/fx_dib.h"
#include "third_party/base/ptr_util.h"
diff --git a/core/fpdfapi/render/cpdf_dibsource.h b/core/fpdfapi/render/cpdf_dibsource.h
index 00f8c3a2f5..d0730cc4fd 100644
--- a/core/fpdfapi/render/cpdf_dibsource.h
+++ b/core/fpdfapi/render/cpdf_dibsource.h
@@ -18,7 +18,7 @@
#include "core/fpdfapi/render/cpdf_imageloader.h"
#include "core/fpdfapi/render/cpdf_rendercontext.h"
#include "core/fpdfapi/render/cpdf_renderoptions.h"
-#include "core/fxge/cfx_fxgedevice.h"
+#include "core/fxge/cfx_defaultrenderdevice.h"
#include "core/fxge/cfx_renderdevice.h"
class CCodec_Jbig2Context;
diff --git a/core/fpdfapi/render/cpdf_imagerenderer.cpp b/core/fpdfapi/render/cpdf_imagerenderer.cpp
index dd1044816a..28548121b9 100644
--- a/core/fpdfapi/render/cpdf_imagerenderer.cpp
+++ b/core/fpdfapi/render/cpdf_imagerenderer.cpp
@@ -27,7 +27,7 @@
#include "core/fpdfdoc/cpdf_occontext.h"
#include "core/fxcrt/cfx_maybe_owned.h"
#include "core/fxcrt/fx_safe_types.h"
-#include "core/fxge/cfx_fxgedevice.h"
+#include "core/fxge/cfx_defaultrenderdevice.h"
#include "core/fxge/cfx_pathdata.h"
#include "core/fxge/dib/cfx_dibitmap.h"
#include "core/fxge/dib/cfx_dibsource.h"
@@ -222,8 +222,8 @@ CFX_Matrix CPDF_ImageRenderer::GetDrawMatrix(const FX_RECT& rect) const {
}
void CPDF_ImageRenderer::CalculateDrawImage(
- CFX_FxgeDevice* pBitmapDevice1,
- CFX_FxgeDevice* pBitmapDevice2,
+ CFX_DefaultRenderDevice* pBitmapDevice1,
+ CFX_DefaultRenderDevice* pBitmapDevice2,
const CFX_RetainPtr<CFX_DIBSource>& pDIBSource,
CFX_Matrix* pNewMatrix,
const FX_RECT& rect) const {
@@ -273,7 +273,7 @@ bool CPDF_ImageRenderer::DrawPatternImage(const CFX_Matrix* pObj2Device) {
return false;
CFX_Matrix new_matrix = GetDrawMatrix(rect);
- CFX_FxgeDevice bitmap_device1;
+ CFX_DefaultRenderDevice bitmap_device1;
if (!bitmap_device1.Create(rect.Width(), rect.Height(), FXDIB_Rgb32, nullptr))
return true;
@@ -294,7 +294,7 @@ bool CPDF_ImageRenderer::DrawPatternImage(const CFX_Matrix* pObj2Device) {
&patternDevice, false);
}
- CFX_FxgeDevice bitmap_device2;
+ CFX_DefaultRenderDevice bitmap_device2;
if (!bitmap_device2.Create(rect.Width(), rect.Height(), FXDIB_8bppRgb,
nullptr)) {
return true;
@@ -321,7 +321,7 @@ bool CPDF_ImageRenderer::DrawMaskedImage() {
return false;
CFX_Matrix new_matrix = GetDrawMatrix(rect);
- CFX_FxgeDevice bitmap_device1;
+ CFX_DefaultRenderDevice bitmap_device1;
if (!bitmap_device1.Create(rect.Width(), rect.Height(), FXDIB_Rgb32, nullptr))
return true;
@@ -339,7 +339,7 @@ bool CPDF_ImageRenderer::DrawMaskedImage() {
m_Flags, true, FXDIB_BLEND_NORMAL)) {
image_render.Continue(nullptr);
}
- CFX_FxgeDevice bitmap_device2;
+ CFX_DefaultRenderDevice bitmap_device2;
if (!bitmap_device2.Create(rect.Width(), rect.Height(), FXDIB_8bppRgb,
nullptr))
return true;
diff --git a/core/fpdfapi/render/cpdf_imagerenderer.h b/core/fpdfapi/render/cpdf_imagerenderer.h
index 30cbf38dda..4468b470d9 100644
--- a/core/fpdfapi/render/cpdf_imagerenderer.h
+++ b/core/fpdfapi/render/cpdf_imagerenderer.h
@@ -15,7 +15,7 @@
class CFX_DIBitmap;
class CFX_DIBSource;
-class CFX_FxgeDevice;
+class CFX_DefaultRenderDevice;
class CFX_ImageTransformer;
class CPDF_ImageObject;
class CPDF_PageObject;
@@ -55,8 +55,8 @@ class CPDF_ImageRenderer {
bool NotDrawing() const;
FX_RECT GetDrawRect() const;
CFX_Matrix GetDrawMatrix(const FX_RECT& rect) const;
- void CalculateDrawImage(CFX_FxgeDevice* bitmap_device1,
- CFX_FxgeDevice* bitmap_device2,
+ void CalculateDrawImage(CFX_DefaultRenderDevice* bitmap_device1,
+ CFX_DefaultRenderDevice* bitmap_device2,
const CFX_RetainPtr<CFX_DIBSource>& pDIBSource,
CFX_Matrix* pNewMatrix,
const FX_RECT& rect) const;
diff --git a/core/fpdfapi/render/cpdf_rendercontext.cpp b/core/fpdfapi/render/cpdf_rendercontext.cpp
index e4ef9af94d..c8626af9ff 100644
--- a/core/fpdfapi/render/cpdf_rendercontext.cpp
+++ b/core/fpdfapi/render/cpdf_rendercontext.cpp
@@ -35,7 +35,7 @@ void CPDF_RenderContext::GetBackground(
const CPDF_PageObject* pObj,
const CPDF_RenderOptions* pOptions,
CFX_Matrix* pFinalMatrix) {
- CFX_FxgeDevice device;
+ CFX_DefaultRenderDevice device;
device.Attach(pBuffer, false, nullptr, false);
FX_RECT rect(0, 0, device.GetWidth(), device.GetHeight());
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index 44af9a2bac..d485d1dede 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -48,7 +48,7 @@
#include "core/fxcodec/fx_codec.h"
#include "core/fxcrt/cfx_maybe_owned.h"
#include "core/fxcrt/fx_safe_types.h"
-#include "core/fxge/cfx_fxgedevice.h"
+#include "core/fxge/cfx_defaultrenderdevice.h"
#include "core/fxge/cfx_graphstatedata.h"
#include "core/fxge/cfx_pathdata.h"
#include "core/fxge/cfx_renderdevice.h"
@@ -819,7 +819,7 @@ void DrawCoonPatchMeshes(
ASSERT(type == kCoonsPatchMeshShading ||
type == kTensorProductPatchMeshShading);
- CFX_FxgeDevice device;
+ CFX_DefaultRenderDevice device;
device.Attach(pBitmap, false, nullptr, false);
CPDF_MeshStream stream(type, funcs, pShadingStream, pCS);
if (!stream.Load())
@@ -904,7 +904,7 @@ CFX_RetainPtr<CFX_DIBitmap> DrawPatternBitmap(CPDF_Document* pDoc,
pPattern->colored() ? FXDIB_Argb : FXDIB_8bppMask)) {
return nullptr;
}
- CFX_FxgeDevice bitmap_device;
+ CFX_DefaultRenderDevice bitmap_device;
bitmap_device.Attach(pBitmap, false, nullptr, false);
pBitmap->Clear(0);
CFX_FloatRect cell_bbox = pPattern->bbox();
@@ -1538,7 +1538,7 @@ bool CPDF_RenderStatus::ProcessTransparency(CPDF_PageObject* pPageObj,
float scaleY = fabs(deviceCTM.d);
int width = FXSYS_round((float)rect.Width() * scaleX);
int height = FXSYS_round((float)rect.Height() * scaleY);
- CFX_FxgeDevice bitmap_device;
+ CFX_DefaultRenderDevice bitmap_device;
CFX_RetainPtr<CFX_DIBitmap> oriDevice;
if (!isolated && (m_pDevice->GetRenderCaps() & FXRC_GET_BITS)) {
oriDevice = pdfium::MakeRetain<CFX_DIBitmap>();
@@ -1563,7 +1563,7 @@ bool CPDF_RenderStatus::ProcessTransparency(CPDF_PageObject* pPageObj,
return true;
pTextMask->Clear(0);
- CFX_FxgeDevice text_device;
+ CFX_DefaultRenderDevice text_device;
text_device.Attach(pTextMask, false, nullptr, false);
for (uint32_t i = 0; i < pPageObj->m_ClipPath.GetTextCount(); i++) {
CPDF_TextObject* textobj = pPageObj->m_ClipPath.GetText(i);
@@ -1659,7 +1659,7 @@ CFX_RetainPtr<CFX_DIBitmap> CPDF_RenderStatus::GetBackdrop(
FinalMatrix.Scale(scaleX, scaleY);
pBackdrop->Clear(pBackdrop->HasAlpha() ? 0 : 0xffffffff);
- CFX_FxgeDevice device;
+ CFX_DefaultRenderDevice device;
device.Attach(pBackdrop, false, nullptr, false);
m_pContext->Render(&device, pObj, &m_Options, &FinalMatrix);
return pBackdrop;
@@ -1885,7 +1885,7 @@ bool CPDF_RenderStatus::ProcessType3Text(CPDF_TextObject* textobj,
matrix.TransformRect(rect_f);
FX_RECT rect = rect_f.GetOuterRect();
- CFX_FxgeDevice bitmap_device;
+ CFX_DefaultRenderDevice bitmap_device;
if (!bitmap_device.Create((int)(rect.Width() * sa),
(int)(rect.Height() * sd), FXDIB_Argb,
nullptr)) {
@@ -2537,7 +2537,7 @@ CFX_RetainPtr<CFX_DIBitmap> CPDF_RenderStatus::LoadSMask(
pGroup);
form.ParseContent(nullptr, nullptr, nullptr);
- CFX_FxgeDevice bitmap_device;
+ CFX_DefaultRenderDevice bitmap_device;
bool bLuminosity = pSMaskDict->GetStringFor("S") != "Alpha";
int width = pClipRect->right - pClipRect->left;
int height = pClipRect->bottom - pClipRect->top;
diff --git a/core/fpdfapi/render/cpdf_scaledrenderbuffer.cpp b/core/fpdfapi/render/cpdf_scaledrenderbuffer.cpp
index 927d23210c..74d506c05c 100644
--- a/core/fpdfapi/render/cpdf_scaledrenderbuffer.cpp
+++ b/core/fpdfapi/render/cpdf_scaledrenderbuffer.cpp
@@ -8,7 +8,7 @@
#include "core/fpdfapi/render/cpdf_rendercontext.h"
#include "core/fpdfapi/render/cpdf_renderoptions.h"
-#include "core/fxge/cfx_fxgedevice.h"
+#include "core/fxge/cfx_defaultrenderdevice.h"
#include "core/fxge/cfx_renderdevice.h"
#include "third_party/base/ptr_util.h"
@@ -44,7 +44,7 @@ bool CPDF_ScaledRenderBuffer::Initialize(CPDF_RenderContext* pContext,
if (dpiv > max_dpi)
m_Matrix.Scale(1.0f, (float)(max_dpi) / (float)dpiv);
}
- m_pBitmapDevice = pdfium::MakeUnique<CFX_FxgeDevice>();
+ m_pBitmapDevice = pdfium::MakeUnique<CFX_DefaultRenderDevice>();
FXDIB_Format dibFormat = FXDIB_Rgb;
int32_t bpp = 24;
if (m_pDevice->GetDeviceCaps(FXDC_RENDER_CAPS) & FXRC_ALPHA_OUTPUT) {
diff --git a/core/fpdfapi/render/cpdf_scaledrenderbuffer.h b/core/fpdfapi/render/cpdf_scaledrenderbuffer.h
index f802349dcb..92fabefbee 100644
--- a/core/fpdfapi/render/cpdf_scaledrenderbuffer.h
+++ b/core/fpdfapi/render/cpdf_scaledrenderbuffer.h
@@ -10,7 +10,7 @@
#include <memory>
#include "core/fxcrt/fx_coordinates.h"
-#include "core/fxge/cfx_fxgedevice.h"
+#include "core/fxge/cfx_defaultrenderdevice.h"
class CFX_RenderDevice;
class CPDF_PageObject;
@@ -39,7 +39,7 @@ class CPDF_ScaledRenderBuffer {
CPDF_RenderContext* m_pContext;
FX_RECT m_Rect;
const CPDF_PageObject* m_pObject;
- std::unique_ptr<CFX_FxgeDevice> m_pBitmapDevice;
+ std::unique_ptr<CFX_DefaultRenderDevice> m_pBitmapDevice;
CFX_Matrix m_Matrix;
};