| OLD | NEW |
| 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 "../../../include/fxge/fx_ge.h" | 5 #include "core/include/fxge/fx_ge.h" |
| 6 //#define _SKIA_SUPPORT_ | 6 |
| 7 #if defined(_SKIA_SUPPORT_) | 7 #if defined(_SKIA_SUPPORT_) |
| 8 #include "../../../include/fxcodec/fx_codec.h" | 8 #include "core/include/fxcodec/fx_codec.h" |
| 9 | 9 |
| 10 //#define _FOXIT_DEBUG_ | 10 #include "SkDashPathEffect.h" |
| 11 //#define _FOXIT_BENCHMARK_ | 11 #include "SkTLazy.h" |
| 12 #include "SkScan.h" |
| 13 #include "SkRasterClip.h" |
| 14 #include "SkStroke.h" |
| 15 |
| 16 #include "core/src/fxge/agg/include/fx_agg_driver.h" |
| 17 #include "fx_skia_blitter_new.h" |
| 18 #include "fx_skia_device.h" |
| 12 | 19 |
| 13 extern "C" { | 20 extern "C" { |
| 14 extern void FX_OUTPUT_LOG_FUNC(const char*, ...); | 21 extern void FX_OUTPUT_LOG_FUNC(const char*, ...); |
| 15 extern int FX_GET_TICK_FUNC(); | 22 extern int FX_GET_TICK_FUNC(); |
| 16 }; | 23 }; |
| 17 | 24 |
| 18 #ifdef _FOXIT_DEBUG_ | 25 #ifdef _FOXIT_DEBUG_ |
| 19 #define FOXIT_DEBUG1(msg) FX_OUTPUT_LOG_FUNC(msg) | 26 #define FOXIT_DEBUG1(msg) FX_OUTPUT_LOG_FUNC(msg) |
| 20 #define FOXIT_DEBUG2(msg, para) FX_OUTPUT_LOG_FUNC(msg, para) | 27 #define FOXIT_DEBUG2(msg, para) FX_OUTPUT_LOG_FUNC(msg, para) |
| 21 #define FOXIT_DEBUG3(msg, para1, para2) FX_OUTPUT_LOG_FUNC(msg, para1, para2) | 28 #define FOXIT_DEBUG3(msg, para1, para2) FX_OUTPUT_LOG_FUNC(msg, para1, para2) |
| 22 #define FOXIT_DEBUG4(msg, para1, para2, para3) \ | 29 #define FOXIT_DEBUG4(msg, para1, para2, para3) \ |
| 23 FX_OUTPUT_LOG_FUNC(msg, para1, para2, para3) | 30 FX_OUTPUT_LOG_FUNC(msg, para1, para2, para3) |
| 24 #define FOXIT_DEBUG5(msg, para1, para2, para3, param4) \ | 31 #define FOXIT_DEBUG5(msg, para1, para2, para3, param4) \ |
| 25 FX_OUTPUT_LOG_FUNC(msg, para1, para2, para3, param4) | 32 FX_OUTPUT_LOG_FUNC(msg, para1, para2, para3, param4) |
| 26 #else | 33 #else |
| 27 #define FOXIT_DEBUG1(msg) | 34 #define FOXIT_DEBUG1(msg) |
| 28 #define FOXIT_DEBUG2(msg, para) | 35 #define FOXIT_DEBUG2(msg, para) |
| 29 #define FOXIT_DEBUG3(msg, para1, para2) | 36 #define FOXIT_DEBUG3(msg, para1, para2) |
| 30 #define FOXIT_DEBUG4(msg, para1, para2, para3) | 37 #define FOXIT_DEBUG4(msg, para1, para2, para3) |
| 31 #define FOXIT_DEBUG5(msg, para1, para2, para3, param4) | 38 #define FOXIT_DEBUG5(msg, para1, para2, para3, param4) |
| 32 #endif | 39 #endif |
| 33 | 40 |
| 34 #include "SkDashPathEffect.h" | |
| 35 #include "SkTLazy.h" | |
| 36 #include "SkScan.h" | |
| 37 #include "SkRasterClip.h" | |
| 38 #include "SkStroke.h" | |
| 39 | |
| 40 #include "fx_skia_blitter_new.h" | |
| 41 #include "../agg/fx_agg_driver.h" | |
| 42 #include "fx_skia_device.h" | |
| 43 /// Run-length-encoded supersampling antialiased blitter. | 41 /// Run-length-encoded supersampling antialiased blitter. |
| 44 class SuperBlitter_skia { | 42 class SuperBlitter_skia { |
| 45 public: | 43 public: |
| 46 static void DrawPath(const SkPath& srcPath, | 44 static void DrawPath(const SkPath& srcPath, |
| 47 SkBlitter* blitter, | 45 SkBlitter* blitter, |
| 48 const SkRasterClip& rect, | 46 const SkRasterClip& rect, |
| 49 const SkPaint& origPaint); | 47 const SkPaint& origPaint); |
| 50 }; | 48 }; |
| 51 FX_BOOL FxSkDrawTreatAsHairline(const SkPaint& paint, SkScalar* coverage) { | 49 FX_BOOL FxSkDrawTreatAsHairline(const SkPaint& paint, SkScalar* coverage) { |
| 52 if (SkPaint::kStroke_Style != paint.getStyle()) | 50 if (SkPaint::kStroke_Style != paint.getStyle()) |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 new CFX_SkiaDeviceDriver(pBitmap, dither_bits, FALSE, pOriDevice, FALSE); | 618 new CFX_SkiaDeviceDriver(pBitmap, dither_bits, FALSE, pOriDevice, FALSE); |
| 621 SetDeviceDriver(pDriver); | 619 SetDeviceDriver(pDriver); |
| 622 return TRUE; | 620 return TRUE; |
| 623 } | 621 } |
| 624 CFX_SkiaDevice::~CFX_SkiaDevice() { | 622 CFX_SkiaDevice::~CFX_SkiaDevice() { |
| 625 if (m_bOwnedBitmap && GetBitmap()) | 623 if (m_bOwnedBitmap && GetBitmap()) |
| 626 delete GetBitmap(); | 624 delete GetBitmap(); |
| 627 } | 625 } |
| 628 | 626 |
| 629 #endif | 627 #endif |
| OLD | NEW |