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

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

Issue 1244093005: Fix SkCanvas::wouldOverwriteEntireSurface() contains test (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: test comment Created 5 years, 5 months 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/ImageTest.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 "SkCanvasPriv.h" 9 #include "SkCanvasPriv.h"
10 #include "SkBitmapDevice.h" 10 #include "SkBitmapDevice.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return false; 63 return false;
64 } 64 }
65 65
66 if (rect) { 66 if (rect) {
67 if (!this->getTotalMatrix().rectStaysRect()) { 67 if (!this->getTotalMatrix().rectStaysRect()) {
68 return false; // conservative 68 return false; // conservative
69 } 69 }
70 70
71 SkRect devRect; 71 SkRect devRect;
72 this->getTotalMatrix().mapRect(&devRect, *rect); 72 this->getTotalMatrix().mapRect(&devRect, *rect);
73 if (devRect.contains(bounds)) { 73 if (!devRect.contains(bounds)) {
74 return false; 74 return false;
75 } 75 }
76 } 76 }
77 77
78 if (paint) { 78 if (paint) {
79 SkPaint::Style paintStyle = paint->getStyle(); 79 SkPaint::Style paintStyle = paint->getStyle();
80 if (!(paintStyle == SkPaint::kFill_Style || 80 if (!(paintStyle == SkPaint::kFill_Style ||
81 paintStyle == SkPaint::kStrokeAndFill_Style)) { 81 paintStyle == SkPaint::kStrokeAndFill_Style)) {
82 return false; 82 return false;
83 } 83 }
(...skipping 2782 matching lines...) Expand 10 before | Expand all | Expand 10 after
2866 } 2866 }
2867 2867
2868 if (matrix) { 2868 if (matrix) {
2869 canvas->concat(*matrix); 2869 canvas->concat(*matrix);
2870 } 2870 }
2871 } 2871 }
2872 2872
2873 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { 2873 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() {
2874 fCanvas->restoreToCount(fSaveCount); 2874 fCanvas->restoreToCount(fSaveCount);
2875 } 2875 }
OLDNEW
« no previous file with comments | « no previous file | tests/ImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698