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 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1695 SkASSERT(outer.getBounds().contains(inner.getBounds())); | 1695 SkASSERT(outer.getBounds().contains(inner.getBounds())); |
1696 | 1696 |
1697 this->onDrawDRRect(outer, inner, paint); | 1697 this->onDrawDRRect(outer, inner, paint); |
1698 } | 1698 } |
1699 | 1699 |
1700 ////////////////////////////////////////////////////////////////////////////// | 1700 ////////////////////////////////////////////////////////////////////////////// |
1701 // These are the virtual drawing methods | 1701 // These are the virtual drawing methods |
1702 ////////////////////////////////////////////////////////////////////////////// | 1702 ////////////////////////////////////////////////////////////////////////////// |
1703 | 1703 |
1704 void SkCanvas::clear(SkColor color) { | 1704 void SkCanvas::clear(SkColor color) { |
1705 SkDrawIter iter(this, false/*clear can affect empty clips*/); | 1705 SkDrawIter iter(this); |
1706 this->predrawNotify(); | 1706 this->predrawNotify(); |
1707 while (iter.next()) { | 1707 while (iter.next()) { |
1708 iter.fDevice->clear(color); | 1708 iter.fDevice->clear(color); |
1709 } | 1709 } |
1710 } | 1710 } |
1711 | 1711 |
1712 void SkCanvas::onDiscard() { | 1712 void SkCanvas::onDiscard() { |
1713 if (fSurfaceBase) { | 1713 if (fSurfaceBase) { |
1714 fSurfaceBase->aboutToDraw(SkSurface::kDiscard_ContentChangeMode); | 1714 fSurfaceBase->aboutToDraw(SkSurface::kDiscard_ContentChangeMode); |
1715 } | 1715 } |
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2579 } | 2579 } |
2580 | 2580 |
2581 if (matrix) { | 2581 if (matrix) { |
2582 canvas->concat(*matrix); | 2582 canvas->concat(*matrix); |
2583 } | 2583 } |
2584 } | 2584 } |
2585 | 2585 |
2586 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { | 2586 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { |
2587 fCanvas->restoreToCount(fSaveCount); | 2587 fCanvas->restoreToCount(fSaveCount); |
2588 } | 2588 } |
OLD | NEW |