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

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

Issue 2081523002: Fix clang_use_chrome_plugin for Mac and Skia builds (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: changes for skia 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
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 #ifndef CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_ 5 #ifndef CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_
6 #define CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_ 6 #define CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_
7 7
8 #if defined(_SKIA_SUPPORT_) 8 #if defined(_SKIA_SUPPORT_)
9 9
10 class SkCanvas; 10 class SkCanvas;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 FX_BOOL FillRectWithBlend(const FX_RECT* pRect, 57 FX_BOOL FillRectWithBlend(const FX_RECT* pRect,
58 uint32_t fill_color, 58 uint32_t fill_color,
59 int blend_type) override; 59 int blend_type) override;
60 60
61 /** Draw a single pixel (device dependant) line */ 61 /** Draw a single pixel (device dependant) line */
62 FX_BOOL DrawCosmeticLine(FX_FLOAT x1, 62 FX_BOOL DrawCosmeticLine(FX_FLOAT x1,
63 FX_FLOAT y1, 63 FX_FLOAT y1,
64 FX_FLOAT x2, 64 FX_FLOAT x2,
65 FX_FLOAT y2, 65 FX_FLOAT y2,
66 uint32_t color, 66 uint32_t color,
67 int blend_type) override { 67 int blend_type) override;
68 return FALSE;
69 }
70 68
71 FX_BOOL GetClipBox(FX_RECT* pRect) override; 69 FX_BOOL GetClipBox(FX_RECT* pRect) override;
72 70
73 /** Load device buffer into a DIB */ 71 /** Load device buffer into a DIB */
74 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, int left, int top) override; 72 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, int left, int top) override;
75 73
76 CFX_DIBitmap* GetBackDrop() override { return m_pOriDevice; } 74 CFX_DIBitmap* GetBackDrop() override;
77 75
78 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, 76 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap,
79 uint32_t color, 77 uint32_t color,
80 const FX_RECT* pSrcRect, 78 const FX_RECT* pSrcRect,
81 int dest_left, 79 int dest_left,
82 int dest_top, 80 int dest_top,
83 int blend_type) override; 81 int blend_type) override;
84 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, 82 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap,
85 uint32_t color, 83 uint32_t color,
86 int dest_left, 84 int dest_left,
87 int dest_top, 85 int dest_top,
88 int dest_width, 86 int dest_width,
89 int dest_height, 87 int dest_height,
90 const FX_RECT* pClipRect, 88 const FX_RECT* pClipRect,
91 uint32_t flags, 89 uint32_t flags,
92 int blend_type) override; 90 int blend_type) override;
93 91
94 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, 92 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap,
95 int bitmap_alpha, 93 int bitmap_alpha,
96 uint32_t color, 94 uint32_t color,
97 const CFX_Matrix* pMatrix, 95 const CFX_Matrix* pMatrix,
98 uint32_t flags, 96 uint32_t flags,
99 void*& handle, 97 void*& handle,
100 int blend_type) override; 98 int blend_type) override;
101 99
102 FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) override { 100 FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) override;
103 return FALSE;
104 }
105 101
106 void CancelDIBits(void* handle) override {} 102 void CancelDIBits(void* handle) override {}
107 103
108 FX_BOOL DrawDeviceText(int nChars, 104 FX_BOOL DrawDeviceText(int nChars,
109 const FXTEXT_CHARPOS* pCharPos, 105 const FXTEXT_CHARPOS* pCharPos,
110 CFX_Font* pFont, 106 CFX_Font* pFont,
111 CFX_FontCache* pCache, 107 CFX_FontCache* pCache,
112 const CFX_Matrix* pObject2Device, 108 const CFX_Matrix* pObject2Device,
113 FX_FLOAT font_size, 109 FX_FLOAT font_size,
114 uint32_t color) override; 110 uint32_t color) override;
115 111
116 FX_BOOL DrawShading(const CPDF_ShadingPattern* pPattern, 112 FX_BOOL DrawShading(const CPDF_ShadingPattern* pPattern,
117 const CFX_Matrix* pMatrix, 113 const CFX_Matrix* pMatrix,
118 const FX_RECT& clip_rect, 114 const FX_RECT& clip_rect,
119 int alpha, 115 int alpha,
120 FX_BOOL bAlphaMode) override; 116 FX_BOOL bAlphaMode) override;
121 117
122 virtual uint8_t* GetBuffer() const { return m_pBitmap->GetBuffer(); } 118 virtual uint8_t* GetBuffer() const;
119
123 void PaintStroke(SkPaint* spaint, 120 void PaintStroke(SkPaint* spaint,
124 const CFX_GraphStateData* pGraphState, 121 const CFX_GraphStateData* pGraphState,
125 const SkMatrix& matrix); 122 const SkMatrix& matrix);
126 SkPictureRecorder* GetRecorder() const { return m_pRecorder; } 123 SkPictureRecorder* GetRecorder() const { return m_pRecorder; }
127 void PreMultiply(); 124 void PreMultiply();
128 125
129 private: 126 private:
130 CFX_DIBitmap* m_pBitmap; 127 CFX_DIBitmap* m_pBitmap;
131 CFX_DIBitmap* m_pOriDevice; 128 CFX_DIBitmap* m_pOriDevice;
132 SkCanvas* m_pCanvas; 129 SkCanvas* m_pCanvas;
133 SkPictureRecorder* const m_pRecorder; 130 SkPictureRecorder* const m_pRecorder;
134 FX_BOOL m_bRgbByteOrder; 131 FX_BOOL m_bRgbByteOrder;
135 FX_BOOL m_bGroupKnockout; 132 FX_BOOL m_bGroupKnockout;
136 }; 133 };
137 #endif // defined(_SKIA_SUPPORT_) 134 #endif // defined(_SKIA_SUPPORT_)
138 135
139 #endif // CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_ 136 #endif // CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698