| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008-2009 Torch Mobile, Inc. | 3 * Copyright (C) 2008-2009 Torch Mobile, Inc. |
| 4 * Copyright (C) 2013 Google Inc. All rights reserved. | 4 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 // See bug# 372110 | 105 // See bug# 372110 |
| 106 bool isRecordingCanvas() const | 106 bool isRecordingCanvas() const |
| 107 { | 107 { |
| 108 return m_canvas->imageInfo().colorType() == kUnknown_SkColorType; | 108 return m_canvas->imageInfo().colorType() == kUnknown_SkColorType; |
| 109 } | 109 } |
| 110 | 110 |
| 111 // ---------- State management methods ----------------- | 111 // ---------- State management methods ----------------- |
| 112 void save(); | 112 void save(); |
| 113 void restore(); | 113 void restore(); |
| 114 unsigned saveCount() { return m_canvasStateStack.size(); } | 114 unsigned saveCount() { return m_canvasStateStack.size(); } |
| 115 #if !ASSERT_DISABLED | 115 #if ASSERT_ENABLED |
| 116 void disableDestructionChecks() { m_disableDestructionChecks = true; } | 116 void disableDestructionChecks() { m_disableDestructionChecks = true; } |
| 117 #endif | 117 #endif |
| 118 | 118 |
| 119 void saveLayer(const SkRect* bounds, const SkPaint*); | 119 void saveLayer(const SkRect* bounds, const SkPaint*); |
| 120 void restoreLayer(); | 120 void restoreLayer(); |
| 121 | 121 |
| 122 float strokeThickness() const { return immutableState()->strokeData().thickn
ess(); } | 122 float strokeThickness() const { return immutableState()->strokeData().thickn
ess(); } |
| 123 void setStrokeThickness(float thickness) { mutableState()->setStrokeThicknes
s(thickness); } | 123 void setStrokeThickness(float thickness) { mutableState()->setStrokeThicknes
s(thickness); } |
| 124 | 124 |
| 125 StrokeStyle strokeStyle() const { return immutableState()->strokeData().styl
e(); } | 125 StrokeStyle strokeStyle() const { return immutableState()->strokeData().styl
e(); } |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 // the draw operations will happen. | 507 // the draw operations will happen. |
| 508 struct CanvasSaveState; | 508 struct CanvasSaveState; |
| 509 Vector<CanvasSaveState> m_canvasStateStack; | 509 Vector<CanvasSaveState> m_canvasStateStack; |
| 510 bool m_pendingCanvasSave; | 510 bool m_pendingCanvasSave; |
| 511 | 511 |
| 512 AnnotationModeFlags m_annotationMode; | 512 AnnotationModeFlags m_annotationMode; |
| 513 | 513 |
| 514 struct RecordingState; | 514 struct RecordingState; |
| 515 Vector<RecordingState> m_recordingStateStack; | 515 Vector<RecordingState> m_recordingStateStack; |
| 516 | 516 |
| 517 #if !ASSERT_DISABLED | 517 #if ASSERT_ENABLED |
| 518 unsigned m_annotationCount; | 518 unsigned m_annotationCount; |
| 519 unsigned m_layerCount; | 519 unsigned m_layerCount; |
| 520 bool m_disableDestructionChecks; | 520 bool m_disableDestructionChecks; |
| 521 #endif | 521 #endif |
| 522 // Tracks the region painted opaque via the GraphicsContext. | 522 // Tracks the region painted opaque via the GraphicsContext. |
| 523 OpaqueRegionSkia m_opaqueRegion; | 523 OpaqueRegionSkia m_opaqueRegion; |
| 524 | 524 |
| 525 // Tracks the region where text is painted via the GraphicsContext. | 525 // Tracks the region where text is painted via the GraphicsContext. |
| 526 SkRect m_textRegion; | 526 SkRect m_textRegion; |
| 527 | 527 |
| 528 unsigned m_disabledState; | 528 unsigned m_disabledState; |
| 529 | 529 |
| 530 // Activation for the above region tracking features | 530 // Activation for the above region tracking features |
| 531 bool m_trackOpaqueRegion : 1; | 531 bool m_trackOpaqueRegion : 1; |
| 532 bool m_trackTextRegion : 1; | 532 bool m_trackTextRegion : 1; |
| 533 | 533 |
| 534 // Are we on a high DPI display? If so, spelling and grammar markers are lar
ger. | 534 // Are we on a high DPI display? If so, spelling and grammar markers are lar
ger. |
| 535 bool m_useHighResMarker : 1; | 535 bool m_useHighResMarker : 1; |
| 536 // FIXME: Make this go away: crbug.com/236892 | 536 // FIXME: Make this go away: crbug.com/236892 |
| 537 bool m_updatingControlTints : 1; | 537 bool m_updatingControlTints : 1; |
| 538 bool m_accelerated : 1; | 538 bool m_accelerated : 1; |
| 539 bool m_isCertainlyOpaque : 1; | 539 bool m_isCertainlyOpaque : 1; |
| 540 bool m_printing : 1; | 540 bool m_printing : 1; |
| 541 bool m_antialiasHairlineImages : 1; | 541 bool m_antialiasHairlineImages : 1; |
| 542 }; | 542 }; |
| 543 | 543 |
| 544 } // namespace WebCore | 544 } // namespace WebCore |
| 545 | 545 |
| 546 #endif // GraphicsContext_h | 546 #endif // GraphicsContext_h |
| OLD | NEW |