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

Side by Side Diff: core/include/fxge/fx_ge.h

Issue 1776313002: Add bitmaps and skp output to Skia port (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments and fix gn Created 4 years, 9 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
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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_INCLUDE_FXGE_FX_GE_H_ 7 #ifndef CORE_INCLUDE_FXGE_FX_GE_H_
8 #define CORE_INCLUDE_FXGE_FX_GE_H_ 8 #define CORE_INCLUDE_FXGE_FX_GE_H_
9 9
10 #include "core/include/fxge/fx_dib.h" 10 #include "core/include/fxge/fx_dib.h"
11 #include "core/include/fxge/fx_font.h" 11 #include "core/include/fxge/fx_font.h"
12 12
13 class CFX_Font; 13 class CFX_Font;
14 class CFX_FontMgr; 14 class CFX_FontMgr;
15 class CFX_FontCache; 15 class CFX_FontCache;
16 class CFX_FaceCache; 16 class CFX_FaceCache;
17 class IFX_RenderDeviceDriver; 17 class IFX_RenderDeviceDriver;
18 class CCodec_ModuleMgr; 18 class CCodec_ModuleMgr;
19 class SkPictureRecorder;
19 20
20 class CFX_GEModule { 21 class CFX_GEModule {
21 public: 22 public:
22 static void Create(const char** pUserFontPaths); 23 static void Create(const char** pUserFontPaths);
23 24
24 static void Use(CFX_GEModule* pMgr); 25 static void Use(CFX_GEModule* pMgr);
25 26
26 static CFX_GEModule* Get(); 27 static CFX_GEModule* Get();
27 28
28 static void Destroy(); 29 static void Destroy();
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 421
421 FX_BOOL Create(int width, 422 FX_BOOL Create(int width,
422 int height, 423 int height,
423 FXDIB_Format format, 424 FXDIB_Format format,
424 int dither_bits = 0, 425 int dither_bits = 0,
425 CFX_DIBitmap* pOriDevice = NULL); 426 CFX_DIBitmap* pOriDevice = NULL);
426 427
427 protected: 428 protected:
428 FX_BOOL m_bOwnedBitmap; 429 FX_BOOL m_bOwnedBitmap;
429 }; 430 };
431
430 class CFX_SkiaDevice : public CFX_RenderDevice { 432 class CFX_SkiaDevice : public CFX_RenderDevice {
431 public: 433 public:
432 CFX_SkiaDevice(); 434 CFX_SkiaDevice();
433 ~CFX_SkiaDevice() override; 435 ~CFX_SkiaDevice() override;
434 436
435 FX_BOOL Attach(CFX_DIBitmap* pBitmap, 437 FX_BOOL Attach(CFX_DIBitmap* pBitmap,
436 int dither_bits = 0, 438 int dither_bits = 0,
437 FX_BOOL bRgbByteOrder = FALSE, 439 FX_BOOL bRgbByteOrder = FALSE,
438 CFX_DIBitmap* pOriDevice = NULL, 440 CFX_DIBitmap* pOriDevice = NULL,
439 FX_BOOL bGroupKnockout = FALSE); 441 FX_BOOL bGroupKnockout = FALSE);
440 442
443 FX_BOOL AttachRecorder(SkPictureRecorder* recorder);
444
441 FX_BOOL Create(int width, 445 FX_BOOL Create(int width,
442 int height, 446 int height,
443 FXDIB_Format format, 447 FXDIB_Format format,
444 int dither_bits = 0, 448 int dither_bits = 0,
445 CFX_DIBitmap* pOriDevice = NULL); 449 CFX_DIBitmap* pOriDevice = NULL);
446 450
451 SkPictureRecorder* CreateRecorder(int size_x, int size_y);
452
447 protected: 453 protected:
448 FX_BOOL m_bOwnedBitmap; 454 FX_BOOL m_bOwnedBitmap;
449 }; 455 };
450 456
451 class IFX_RenderDeviceDriver { 457 class IFX_RenderDeviceDriver {
452 public: 458 public:
453 static IFX_RenderDeviceDriver* CreateFxgeDriver( 459 static IFX_RenderDeviceDriver* CreateFxgeDriver(
454 CFX_DIBitmap* pBitmap, 460 CFX_DIBitmap* pBitmap,
455 FX_BOOL bRgbByteOrder = FALSE, 461 FX_BOOL bRgbByteOrder = FALSE,
456 CFX_DIBitmap* pOriDevice = NULL, 462 CFX_DIBitmap* pOriDevice = NULL,
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 void FindPSFontGlyph(CFX_FaceCache* pFaceCache, 707 void FindPSFontGlyph(CFX_FaceCache* pFaceCache,
702 CFX_Font* pFont, 708 CFX_Font* pFont,
703 const FXTEXT_CHARPOS& charpos, 709 const FXTEXT_CHARPOS& charpos,
704 int& ps_fontnum, 710 int& ps_fontnum,
705 int& ps_glyphindex); 711 int& ps_glyphindex);
706 712
707 void WritePSBinary(const uint8_t* data, int len); 713 void WritePSBinary(const uint8_t* data, int len);
708 }; 714 };
709 715
710 #endif // CORE_INCLUDE_FXGE_FX_GE_H_ 716 #endif // CORE_INCLUDE_FXGE_FX_GE_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | core/src/fxge/agg/fx_agg_driver.h » ('j') | core/src/fxge/skia/fx_skia_device.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698