| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkPDFDevice.h" | 8 #include "SkPDFDevice.h" |
| 9 | 9 |
| 10 #include "SkAnnotation.h" | 10 #include "SkAnnotation.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 GraphicStateEntry::GraphicStateEntry() : fColor(SK_ColorBLACK), | 225 GraphicStateEntry::GraphicStateEntry() : fColor(SK_ColorBLACK), |
| 226 fTextScaleX(SK_Scalar1), | 226 fTextScaleX(SK_Scalar1), |
| 227 fTextFill(SkPaint::kFill_Style), | 227 fTextFill(SkPaint::kFill_Style), |
| 228 fShaderIndex(-1), | 228 fShaderIndex(-1), |
| 229 fGraphicStateIndex(-1), | 229 fGraphicStateIndex(-1), |
| 230 fFont(NULL), | 230 fFont(NULL), |
| 231 fTextSize(SK_ScalarNaN) { | 231 fTextSize(SK_ScalarNaN) { |
| 232 fMatrix.reset(); | 232 fMatrix.reset(); |
| 233 } | 233 } |
| 234 | 234 |
| 235 bool GraphicStateEntry::compareInitialState(const GraphicStateEntry& b) { | 235 bool GraphicStateEntry::compareInitialState(const GraphicStateEntry& cur) { |
| 236 return fColor == b.fColor && | 236 return fColor == cur.fColor && |
| 237 fShaderIndex == b.fShaderIndex && | 237 fShaderIndex == cur.fShaderIndex && |
| 238 fGraphicStateIndex == b.fGraphicStateIndex && | 238 fGraphicStateIndex == cur.fGraphicStateIndex && |
| 239 fMatrix == b.fMatrix && | 239 fMatrix == cur.fMatrix && |
| 240 fClipStack == b.fClipStack && | 240 fClipStack == cur.fClipStack && |
| 241 (fTextScaleX == 0 || | 241 (fTextScaleX == 0 || |
| 242 b.fTextScaleX == 0 || | 242 (fTextScaleX == cur.fTextScaleX && fTextFill == cur.fTextFill)); |
| 243 (fTextScaleX == b.fTextScaleX && fTextFill == b.fTextFill)); | |
| 244 } | 243 } |
| 245 | 244 |
| 246 class GraphicStackState { | 245 class GraphicStackState { |
| 247 public: | 246 public: |
| 248 GraphicStackState(const SkClipStack& existingClipStack, | 247 GraphicStackState(const SkClipStack& existingClipStack, |
| 249 const SkRegion& existingClipRegion, | 248 const SkRegion& existingClipRegion, |
| 250 SkWStream* contentStream) | 249 SkWStream* contentStream) |
| 251 : fStackDepth(0), | 250 : fStackDepth(0), |
| 252 fContentStream(contentStream) { | 251 fContentStream(contentStream) { |
| 253 fEntries[0].fClipStack = existingClipStack; | 252 fEntries[0].fClipStack = existingClipStack; |
| (...skipping 2072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2326 } | 2325 } |
| 2327 | 2326 |
| 2328 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, | 2327 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, |
| 2329 SkCanvas::Config8888) { | 2328 SkCanvas::Config8888) { |
| 2330 return false; | 2329 return false; |
| 2331 } | 2330 } |
| 2332 | 2331 |
| 2333 bool SkPDFDevice::allowImageFilter(SkImageFilter*) { | 2332 bool SkPDFDevice::allowImageFilter(SkImageFilter*) { |
| 2334 return false; | 2333 return false; |
| 2335 } | 2334 } |
| OLD | NEW |