OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 The Android Open Source Project | 2 * Copyright 2008 The Android Open Source Project |
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 "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkCanvasDrawable.h" | 9 #include "SkCanvasDrawable.h" |
10 #include "SkCanvasPriv.h" | 10 #include "SkCanvasPriv.h" |
(...skipping 1688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1699 // For now at least check for containment of bounds | 1699 // For now at least check for containment of bounds |
1700 SkASSERT(outer.getBounds().contains(inner.getBounds())); | 1700 SkASSERT(outer.getBounds().contains(inner.getBounds())); |
1701 | 1701 |
1702 this->onDrawDRRect(outer, inner, paint); | 1702 this->onDrawDRRect(outer, inner, paint); |
1703 } | 1703 } |
1704 | 1704 |
1705 ////////////////////////////////////////////////////////////////////////////// | 1705 ////////////////////////////////////////////////////////////////////////////// |
1706 // These are the virtual drawing methods | 1706 // These are the virtual drawing methods |
1707 ////////////////////////////////////////////////////////////////////////////// | 1707 ////////////////////////////////////////////////////////////////////////////// |
1708 | 1708 |
1709 void SkCanvas::clear(SkColor color) { | |
1710 SkDrawIter iter(this); | |
1711 this->predrawNotify(); | |
1712 while (iter.next()) { | |
1713 iter.fDevice->clear(color); | |
1714 } | |
1715 } | |
1716 | |
1717 void SkCanvas::onDiscard() { | 1709 void SkCanvas::onDiscard() { |
1718 if (fSurfaceBase) { | 1710 if (fSurfaceBase) { |
1719 fSurfaceBase->aboutToDraw(SkSurface::kDiscard_ContentChangeMode); | 1711 fSurfaceBase->aboutToDraw(SkSurface::kDiscard_ContentChangeMode); |
1720 } | 1712 } |
1721 } | 1713 } |
1722 | 1714 |
1723 void SkCanvas::drawPaint(const SkPaint& paint) { | 1715 void SkCanvas::drawPaint(const SkPaint& paint) { |
1724 TRACE_EVENT0("disabled-by-default-skia", "SkCanvas::drawPaint()"); | 1716 TRACE_EVENT0("disabled-by-default-skia", "SkCanvas::drawPaint()"); |
1725 this->internalDrawPaint(paint); | 1717 this->internalDrawPaint(paint); |
1726 } | 1718 } |
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2584 } | 2576 } |
2585 | 2577 |
2586 if (matrix) { | 2578 if (matrix) { |
2587 canvas->concat(*matrix); | 2579 canvas->concat(*matrix); |
2588 } | 2580 } |
2589 } | 2581 } |
2590 | 2582 |
2591 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { | 2583 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { |
2592 fCanvas->restoreToCount(fSaveCount); | 2584 fCanvas->restoreToCount(fSaveCount); |
2593 } | 2585 } |
OLD | NEW |