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

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

Issue 1975143002: allow Skia to be the default graphics engine (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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/agg/fx_agg_driver.cpp ('k') | core/fxge/skia/fx_skia_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 // 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_FXGE_INCLUDE_FX_GE_H_ 7 #ifndef CORE_FXGE_INCLUDE_FX_GE_H_
8 #define CORE_FXGE_INCLUDE_FX_GE_H_ 8 #define CORE_FXGE_INCLUDE_FX_GE_H_
9 9
10 #include "core/fxge/include/fx_dib.h" 10 #include "core/fxge/include/fx_dib.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 bool bRgbByteOrder = false, 427 bool bRgbByteOrder = false,
428 CFX_DIBitmap* pOriDevice = NULL, 428 CFX_DIBitmap* pOriDevice = NULL,
429 bool bGroupKnockout = false); 429 bool bGroupKnockout = false);
430 430
431 bool Create(int width, 431 bool Create(int width,
432 int height, 432 int height,
433 FXDIB_Format format, 433 FXDIB_Format format,
434 int dither_bits = 0, 434 int dither_bits = 0,
435 CFX_DIBitmap* pOriDevice = NULL); 435 CFX_DIBitmap* pOriDevice = NULL);
436 436
437 #ifdef _SKIA_SUPPORT_
438 bool AttachRecorder(SkPictureRecorder* recorder);
439 SkPictureRecorder* CreateRecorder(int size_x, int size_y);
440 #endif
441
437 protected: 442 protected:
438 bool m_bOwnedBitmap; 443 bool m_bOwnedBitmap;
439 }; 444 };
440 445
441 class CFX_SkiaDevice : public CFX_RenderDevice {
442 public:
443 CFX_SkiaDevice();
444 ~CFX_SkiaDevice() override;
445
446 FX_BOOL Attach(CFX_DIBitmap* pBitmap,
447 int dither_bits = 0,
448 FX_BOOL bRgbByteOrder = FALSE,
449 CFX_DIBitmap* pOriDevice = NULL,
450 FX_BOOL bGroupKnockout = FALSE);
451
452 FX_BOOL AttachRecorder(SkPictureRecorder* recorder);
453
454 FX_BOOL Create(int width,
455 int height,
456 FXDIB_Format format,
457 int dither_bits = 0,
458 CFX_DIBitmap* pOriDevice = NULL);
459
460 SkPictureRecorder* CreateRecorder(int size_x, int size_y);
461
462 protected:
463 FX_BOOL m_bOwnedBitmap;
464 };
465
466 class IFX_RenderDeviceDriver { 446 class IFX_RenderDeviceDriver {
467 public: 447 public:
468 static IFX_RenderDeviceDriver* CreateFxgeDriver( 448 static IFX_RenderDeviceDriver* CreateFxgeDriver(
469 CFX_DIBitmap* pBitmap, 449 CFX_DIBitmap* pBitmap,
470 FX_BOOL bRgbByteOrder = FALSE, 450 FX_BOOL bRgbByteOrder = FALSE,
471 CFX_DIBitmap* pOriDevice = NULL, 451 CFX_DIBitmap* pOriDevice = NULL,
472 FX_BOOL bGroupKnockout = FALSE); 452 FX_BOOL bGroupKnockout = FALSE);
473 453
474 virtual ~IFX_RenderDeviceDriver() {} 454 virtual ~IFX_RenderDeviceDriver() {}
475 virtual void Begin() {} 455 virtual void Begin() {}
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 void FindPSFontGlyph(CFX_FaceCache* pFaceCache, 702 void FindPSFontGlyph(CFX_FaceCache* pFaceCache,
723 CFX_Font* pFont, 703 CFX_Font* pFont,
724 const FXTEXT_CHARPOS& charpos, 704 const FXTEXT_CHARPOS& charpos,
725 int& ps_fontnum, 705 int& ps_fontnum,
726 int& ps_glyphindex); 706 int& ps_glyphindex);
727 707
728 void WritePSBinary(const uint8_t* data, int len); 708 void WritePSBinary(const uint8_t* data, int len);
729 }; 709 };
730 710
731 #endif // CORE_FXGE_INCLUDE_FX_GE_H_ 711 #endif // CORE_FXGE_INCLUDE_FX_GE_H_
OLDNEW
« no previous file with comments | « core/fxge/agg/fx_agg_driver.cpp ('k') | core/fxge/skia/fx_skia_device.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698