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

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

Issue 748733002: Revert of SkCanvas::clear() should call down to devices even when the clip is empty. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | tests/CanvasTest.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 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « no previous file | tests/CanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698