| 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 void drawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[]
, SkScalar constY, const SkRect& textRect, const SkPaint&); | 271 void drawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[]
, SkScalar constY, const SkRect& textRect, const SkPaint&); |
| 272 void drawTextOnPath(const void* text, size_t byteLength, const SkPath&, cons
t SkRect& textRect, const SkMatrix*, const SkPaint&); | 272 void drawTextOnPath(const void* text, size_t byteLength, const SkPath&, cons
t SkRect& textRect, const SkMatrix*, const SkPaint&); |
| 273 | 273 |
| 274 void clip(const IntRect& rect) { clip(FloatRect(rect)); } | 274 void clip(const IntRect& rect) { clip(FloatRect(rect)); } |
| 275 void clip(const FloatRect& rect) { clipRect(rect); } | 275 void clip(const FloatRect& rect) { clipRect(rect); } |
| 276 void clipRoundedRect(const RoundedRect&); | 276 void clipRoundedRect(const RoundedRect&); |
| 277 void clipOut(const IntRect& rect) { clipRect(rect, NotAntiAliased, SkRegion:
:kDifference_Op); } | 277 void clipOut(const IntRect& rect) { clipRect(rect, NotAntiAliased, SkRegion:
:kDifference_Op); } |
| 278 void clipOutRoundedRect(const RoundedRect&); | 278 void clipOutRoundedRect(const RoundedRect&); |
| 279 void clipPath(const Path&, WindRule = RULE_EVENODD); | 279 void clipPath(const Path&, WindRule = RULE_EVENODD); |
| 280 void clipConvexPolygon(size_t numPoints, const FloatPoint*, bool antialias =
true); | 280 void clipConvexPolygon(size_t numPoints, const FloatPoint*, bool antialias =
true); |
| 281 void clipToImageBuffer(const ImageBuffer*, const FloatRect&); | |
| 282 bool clipRect(const SkRect&, AntiAliasingMode = NotAntiAliased, SkRegion::Op
= SkRegion::kIntersect_Op); | 281 bool clipRect(const SkRect&, AntiAliasingMode = NotAntiAliased, SkRegion::Op
= SkRegion::kIntersect_Op); |
| 283 | 282 |
| 284 void drawText(const Font&, const TextRunPaintInfo&, const FloatPoint&); | 283 void drawText(const Font&, const TextRunPaintInfo&, const FloatPoint&); |
| 285 void drawEmphasisMarks(const Font&, const TextRunPaintInfo&, const AtomicStr
ing& mark, const FloatPoint&); | 284 void drawEmphasisMarks(const Font&, const TextRunPaintInfo&, const AtomicStr
ing& mark, const FloatPoint&); |
| 286 void drawBidiText(const Font&, const TextRunPaintInfo&, const FloatPoint&, F
ont::CustomFontNotReadyAction = Font::DoNotPaintIfFontNotReady); | 285 void drawBidiText(const Font&, const TextRunPaintInfo&, const FloatPoint&, F
ont::CustomFontNotReadyAction = Font::DoNotPaintIfFontNotReady); |
| 287 void drawHighlightForText(const Font&, const TextRun&, const FloatPoint&, in
t h, const Color& backgroundColor, int from = 0, int to = -1); | 286 void drawHighlightForText(const Font&, const TextRun&, const FloatPoint&, in
t h, const Color& backgroundColor, int from = 0, int to = -1); |
| 288 | 287 |
| 289 void drawLineForText(const FloatPoint&, float width, bool printing); | 288 void drawLineForText(const FloatPoint&, float width, bool printing); |
| 290 enum DocumentMarkerLineStyle { | 289 enum DocumentMarkerLineStyle { |
| 291 DocumentMarkerSpellingLineStyle, | 290 DocumentMarkerSpellingLineStyle, |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 void drawInnerPath(const SkPath&, SkPaint&, int); | 400 void drawInnerPath(const SkPath&, SkPaint&, int); |
| 402 | 401 |
| 403 // SkCanvas wrappers. | 402 // SkCanvas wrappers. |
| 404 bool isDrawingToLayer() const { return m_canvas->isDrawingToLayer(); } | 403 bool isDrawingToLayer() const { return m_canvas->isDrawingToLayer(); } |
| 405 | 404 |
| 406 bool clipPath(const SkPath&, AntiAliasingMode = NotAntiAliased, SkRegion::Op
= SkRegion::kIntersect_Op); | 405 bool clipPath(const SkPath&, AntiAliasingMode = NotAntiAliased, SkRegion::Op
= SkRegion::kIntersect_Op); |
| 407 bool clipRRect(const SkRRect&, AntiAliasingMode = NotAntiAliased, SkRegion::
Op = SkRegion::kIntersect_Op); | 406 bool clipRRect(const SkRRect&, AntiAliasingMode = NotAntiAliased, SkRegion::
Op = SkRegion::kIntersect_Op); |
| 408 | 407 |
| 409 bool concat(const SkMatrix&); | 408 bool concat(const SkMatrix&); |
| 410 | 409 |
| 411 // Used when restoring and the state has an image clip. Only shows the pixel
s in | |
| 412 // m_canvas that are also in imageBuffer. | |
| 413 // The clipping rectangle is given in absolute coordinates. | |
| 414 void applyClipFromImage(const SkRect&, const SkBitmap&); | |
| 415 | |
| 416 // common code between setupPaintFor[Filling,Stroking] | 410 // common code between setupPaintFor[Filling,Stroking] |
| 417 void setupShader(SkPaint*, Gradient*, Pattern*, SkColor) const; | 411 void setupShader(SkPaint*, Gradient*, Pattern*, SkColor) const; |
| 418 | 412 |
| 419 // Apply deferred saves | 413 // Apply deferred saves |
| 420 void realizeSave(SkCanvas::SaveFlags flags) | 414 void realizeSave(SkCanvas::SaveFlags flags) |
| 421 { | 415 { |
| 422 if (m_deferredSaveFlags & flags) { | 416 if (m_deferredSaveFlags & flags) { |
| 423 m_canvas->save((SkCanvas::SaveFlags)m_deferredSaveFlags); | 417 m_canvas->save((SkCanvas::SaveFlags)m_deferredSaveFlags); |
| 424 m_deferredSaveFlags = 0; | 418 m_deferredSaveFlags = 0; |
| 425 } | 419 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 // FIXME: Make this go away: crbug.com/236892 | 459 // FIXME: Make this go away: crbug.com/236892 |
| 466 bool m_updatingControlTints : 1; | 460 bool m_updatingControlTints : 1; |
| 467 bool m_accelerated : 1; | 461 bool m_accelerated : 1; |
| 468 bool m_isCertainlyOpaque : 1; | 462 bool m_isCertainlyOpaque : 1; |
| 469 bool m_printing : 1; | 463 bool m_printing : 1; |
| 470 }; | 464 }; |
| 471 | 465 |
| 472 } // namespace WebCore | 466 } // namespace WebCore |
| 473 | 467 |
| 474 #endif // GraphicsContext_h | 468 #endif // GraphicsContext_h |
| OLD | NEW |