Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(397)

Side by Side Diff: src/core/SkCanvas.cpp

Issue 778563002: Revert "Change clear() to respect the clip" (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkBitmapDevice.cpp ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
1709 void SkCanvas::onDiscard() { 1717 void SkCanvas::onDiscard() {
1710 if (fSurfaceBase) { 1718 if (fSurfaceBase) {
1711 fSurfaceBase->aboutToDraw(SkSurface::kDiscard_ContentChangeMode); 1719 fSurfaceBase->aboutToDraw(SkSurface::kDiscard_ContentChangeMode);
1712 } 1720 }
1713 } 1721 }
1714 1722
1715 void SkCanvas::drawPaint(const SkPaint& paint) { 1723 void SkCanvas::drawPaint(const SkPaint& paint) {
1716 TRACE_EVENT0("disabled-by-default-skia", "SkCanvas::drawPaint()"); 1724 TRACE_EVENT0("disabled-by-default-skia", "SkCanvas::drawPaint()");
1717 this->internalDrawPaint(paint); 1725 this->internalDrawPaint(paint);
1718 } 1726 }
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
2576 } 2584 }
2577 2585
2578 if (matrix) { 2586 if (matrix) {
2579 canvas->concat(*matrix); 2587 canvas->concat(*matrix);
2580 } 2588 }
2581 } 2589 }
2582 2590
2583 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { 2591 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() {
2584 fCanvas->restoreToCount(fSaveCount); 2592 fCanvas->restoreToCount(fSaveCount);
2585 } 2593 }
OLDNEW
« no previous file with comments | « src/core/SkBitmapDevice.cpp ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698