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

Side by Side Diff: core/fxge/skia/fx_skia_device.cpp

Issue 2078783002: Move ifx_renderdevicedriver to a separate file to share (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase to master Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « core/fxge/skia/fx_skia_device.h ('k') | core/fxge/win32/fx_win32_device.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/fxge/include/fx_ge.h" 5 #include "core/fxge/include/fx_ge.h"
6 6
7 #if defined(_SKIA_SUPPORT_) 7 #if defined(_SKIA_SUPPORT_)
8 #include <algorithm> 8 #include <algorithm>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 for (int index = 0; index < nChars; ++index) { 613 for (int index = 0; index < nChars; ++index) {
614 const FXTEXT_CHARPOS& cp = pCharPos[index]; 614 const FXTEXT_CHARPOS& cp = pCharPos[index];
615 positions[index] = {cp.m_OriginX, cp.m_OriginY}; 615 positions[index] = {cp.m_OriginX, cp.m_OriginY};
616 glyphs[index] = (uint16_t)cp.m_GlyphIndex; 616 glyphs[index] = (uint16_t)cp.m_GlyphIndex;
617 } 617 }
618 m_pCanvas->drawPosText(glyphs.begin(), nChars * 2, positions.begin(), paint); 618 m_pCanvas->drawPosText(glyphs.begin(), nChars * 2, positions.begin(), paint);
619 m_pCanvas->restore(); 619 m_pCanvas->restore();
620 return TRUE; 620 return TRUE;
621 } 621 }
622 622
623 int CFX_SkiaDeviceDriver::GetDeviceCaps(int caps_id) { 623 int CFX_SkiaDeviceDriver::GetDeviceCaps(int caps_id) const {
624 switch (caps_id) { 624 switch (caps_id) {
625 case FXDC_DEVICE_CLASS: 625 case FXDC_DEVICE_CLASS:
626 return FXDC_DISPLAY; 626 return FXDC_DISPLAY;
627 case FXDC_PIXEL_WIDTH: 627 case FXDC_PIXEL_WIDTH:
628 return m_pCanvas->imageInfo().width(); 628 return m_pCanvas->imageInfo().width();
629 case FXDC_PIXEL_HEIGHT: 629 case FXDC_PIXEL_HEIGHT:
630 return m_pCanvas->imageInfo().height(); 630 return m_pCanvas->imageInfo().height();
631 case FXDC_BITS_PIXEL: 631 case FXDC_BITS_PIXEL:
632 return 32; 632 return 32;
633 case FXDC_HORZ_SIZE: 633 case FXDC_HORZ_SIZE:
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 1175
1176 CFX_FxgeDevice::~CFX_FxgeDevice() { 1176 CFX_FxgeDevice::~CFX_FxgeDevice() {
1177 if (m_bOwnedBitmap && GetBitmap()) 1177 if (m_bOwnedBitmap && GetBitmap())
1178 delete GetBitmap(); 1178 delete GetBitmap();
1179 } 1179 }
1180 1180
1181 void CFX_FxgeDevice::PreMultiply() { 1181 void CFX_FxgeDevice::PreMultiply() {
1182 (static_cast<CFX_SkiaDeviceDriver*>(GetDeviceDriver()))->PreMultiply(); 1182 (static_cast<CFX_SkiaDeviceDriver*>(GetDeviceDriver()))->PreMultiply();
1183 } 1183 }
1184 1184
1185 IFX_RenderDeviceDriver::~IFX_RenderDeviceDriver() {}
1186
1187 CFX_Matrix IFX_RenderDeviceDriver::GetCTM() const {
1188 return CFX_Matrix();
1189 }
1190
1191 FX_BOOL IFX_RenderDeviceDriver::StartRendering() {
1192 return TRUE;
1193 }
1194
1195 void IFX_RenderDeviceDriver::EndRendering() {}
1196
1197 FX_BOOL IFX_RenderDeviceDriver::SetClip_PathStroke(
1198 const CFX_PathData* pPathData,
1199 const CFX_Matrix* pObject2Device,
1200 const CFX_GraphStateData* pGraphState) {
1201 return FALSE;
1202 }
1203
1204 FX_BOOL IFX_RenderDeviceDriver::SetPixel(int x, int y, uint32_t color) {
1205 return FALSE;
1206 }
1207
1208 FX_BOOL IFX_RenderDeviceDriver::FillRectWithBlend(const FX_RECT* pRect,
1209 uint32_t fill_color,
1210 int blend_type) {
1211 return FALSE;
1212 }
1213
1214 FX_BOOL IFX_RenderDeviceDriver::DrawCosmeticLine(FX_FLOAT x1,
1215 FX_FLOAT y1,
1216 FX_FLOAT x2,
1217 FX_FLOAT y2,
1218 uint32_t color,
1219 int blend_type) {
1220 return FALSE;
1221 }
1222
1223 FX_BOOL IFX_RenderDeviceDriver::GetDIBits(CFX_DIBitmap* pBitmap,
1224 int left,
1225 int top) {
1226 return FALSE;
1227 }
1228 CFX_DIBitmap* IFX_RenderDeviceDriver::GetBackDrop() {
1229 return nullptr;
1230 }
1231
1232 FX_BOOL IFX_RenderDeviceDriver::ContinueDIBits(void* handle,
1233 IFX_Pause* pPause) {
1234 return FALSE;
1235 }
1236
1237 void IFX_RenderDeviceDriver::CancelDIBits(void* handle) {}
1238
1239 FX_BOOL IFX_RenderDeviceDriver::DrawDeviceText(int nChars,
1240 const FXTEXT_CHARPOS* pCharPos,
1241 CFX_Font* pFont,
1242 CFX_FontCache* pCache,
1243 const CFX_Matrix* pObject2Device,
1244 FX_FLOAT font_size,
1245 uint32_t color) {
1246 return FALSE;
1247 }
1248
1249 void* IFX_RenderDeviceDriver::GetPlatformSurface() const {
1250 return nullptr;
1251 }
1252
1253 int IFX_RenderDeviceDriver::GetDriverType() const {
1254 return 0;
1255 }
1256
1257 void IFX_RenderDeviceDriver::ClearDriver() {}
1258
1259 FX_BOOL IFX_RenderDeviceDriver::DrawShading(const CPDF_ShadingPattern* pPattern,
1260 const CFX_Matrix* pMatrix,
1261 const FX_RECT& clip_rect,
1262 int alpha,
1263 FX_BOOL bAlphaMode) {
1264 return false;
1265 }
1266
1267 #endif 1185 #endif
OLDNEW
« no previous file with comments | « core/fxge/skia/fx_skia_device.h ('k') | core/fxge/win32/fx_win32_device.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698