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

Side by Side Diff: src/utils/SkPaintFilterCanvas.cpp

Issue 1239193002: remove all guards for changes to drawBitmapRect / drawImageRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 4 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 | « src/utils/SkNWayCanvas.cpp ('k') | src/utils/debugger/SkDebugCanvas.h » ('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 2015 Google Inc. 2 * Copyright 2015 Google Inc.
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 "SkPaintFilterCanvas.h" 8 #include "SkPaintFilterCanvas.h"
9 9
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 this->INHERITED::onDrawPath(path, *apf.paint()); 67 this->INHERITED::onDrawPath(path, *apf.paint());
68 } 68 }
69 69
70 void SkPaintFilterCanvas::onDrawBitmap(const SkBitmap& bm, SkScalar left, SkScal ar top, 70 void SkPaintFilterCanvas::onDrawBitmap(const SkBitmap& bm, SkScalar left, SkScal ar top,
71 const SkPaint* paint) { 71 const SkPaint* paint) {
72 AutoPaintFilter apf(this, kBitmap_Type, paint); 72 AutoPaintFilter apf(this, kBitmap_Type, paint);
73 this->INHERITED::onDrawBitmap(bm, left, top, apf.paint()); 73 this->INHERITED::onDrawBitmap(bm, left, top, apf.paint());
74 } 74 }
75 75
76 void SkPaintFilterCanvas::onDrawBitmapRect(const SkBitmap& bm, const SkRect* src , const SkRect& dst, 76 void SkPaintFilterCanvas::onDrawBitmapRect(const SkBitmap& bm, const SkRect* src , const SkRect& dst,
77 const SkPaint* paint, 77 const SkPaint* paint, SrcRectConstrai nt constraint) {
78 SK_VIRTUAL_CONSTRAINT_TYPE constraint ) {
79 AutoPaintFilter apf(this, kBitmap_Type, paint); 78 AutoPaintFilter apf(this, kBitmap_Type, paint);
80 this->INHERITED::onDrawBitmapRect(bm, src, dst, apf.paint(), constraint); 79 this->INHERITED::onDrawBitmapRect(bm, src, dst, apf.paint(), constraint);
81 } 80 }
82 81
83 void SkPaintFilterCanvas::onDrawImage(const SkImage* image, SkScalar left, SkSca lar top, 82 void SkPaintFilterCanvas::onDrawImage(const SkImage* image, SkScalar left, SkSca lar top,
84 const SkPaint* paint) { 83 const SkPaint* paint) {
85 AutoPaintFilter apf(this, kBitmap_Type, paint); 84 AutoPaintFilter apf(this, kBitmap_Type, paint);
86 this->INHERITED::onDrawImage(image, left, top, apf.paint()); 85 this->INHERITED::onDrawImage(image, left, top, apf.paint());
87 } 86 }
88 87
89 void SkPaintFilterCanvas::onDrawImageRect(const SkImage* image, const SkRect* sr c, 88 void SkPaintFilterCanvas::onDrawImageRect(const SkImage* image, const SkRect* sr c,
90 const SkRect& dst, const SkPaint* pain t 89 const SkRect& dst, const SkPaint* pain t,
91 SRC_RECT_CONSTRAINT_PARAM(constraint)) { 90 SrcRectConstraint constraint) {
92 AutoPaintFilter apf(this, kBitmap_Type, paint); 91 AutoPaintFilter apf(this, kBitmap_Type, paint);
93 this->INHERITED::onDrawImageRect(image, src, dst, apf.paint() 92 this->INHERITED::onDrawImageRect(image, src, dst, apf.paint(), constraint);
94 SRC_RECT_CONSTRAINT_ARG(constraint));
95 } 93 }
96 94
97 void SkPaintFilterCanvas::onDrawBitmapNine(const SkBitmap& bm, const SkIRect& ce nter, 95 void SkPaintFilterCanvas::onDrawBitmapNine(const SkBitmap& bm, const SkIRect& ce nter,
98 const SkRect& dst, const SkPaint* pai nt) { 96 const SkRect& dst, const SkPaint* pai nt) {
99 AutoPaintFilter apf(this, kBitmap_Type, paint); 97 AutoPaintFilter apf(this, kBitmap_Type, paint);
100 this->INHERITED::onDrawBitmapNine(bm, center, dst, apf.paint()); 98 this->INHERITED::onDrawBitmapNine(bm, center, dst, apf.paint());
101 } 99 }
102 100
103 void SkPaintFilterCanvas::onDrawSprite(const SkBitmap& bm, int left, int top, 101 void SkPaintFilterCanvas::onDrawSprite(const SkBitmap& bm, int left, int top,
104 const SkPaint* paint) { 102 const SkPaint* paint) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 const SkMatrix* matrix, const SkPaint & paint) { 149 const SkMatrix* matrix, const SkPaint & paint) {
152 AutoPaintFilter apf(this, kText_Type, paint); 150 AutoPaintFilter apf(this, kText_Type, paint);
153 this->INHERITED::onDrawTextOnPath(text, byteLength, path, matrix, *apf.paint ()); 151 this->INHERITED::onDrawTextOnPath(text, byteLength, path, matrix, *apf.paint ());
154 } 152 }
155 153
156 void SkPaintFilterCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkS calar y, 154 void SkPaintFilterCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkS calar y,
157 const SkPaint& paint) { 155 const SkPaint& paint) {
158 AutoPaintFilter apf(this, kTextBlob_Type, paint); 156 AutoPaintFilter apf(this, kTextBlob_Type, paint);
159 this->INHERITED::onDrawTextBlob(blob, x, y, *apf.paint()); 157 this->INHERITED::onDrawTextBlob(blob, x, y, *apf.paint());
160 } 158 }
OLDNEW
« no previous file with comments | « src/utils/SkNWayCanvas.cpp ('k') | src/utils/debugger/SkDebugCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698