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

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

Issue 1228083004: add src-rect-constraint to drawImageRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 this->INHERITED::onDrawBitmapRect(bm, src, dst, apf.paint(), flags); 79 this->INHERITED::onDrawBitmapRect(bm, src, dst, apf.paint(), flags);
80 } 80 }
81 81
82 void SkPaintFilterCanvas::onDrawImage(const SkImage* image, SkScalar left, SkSca lar top, 82 void SkPaintFilterCanvas::onDrawImage(const SkImage* image, SkScalar left, SkSca lar top,
83 const SkPaint* paint) { 83 const SkPaint* paint) {
84 AutoPaintFilter apf(this, kBitmap_Type, paint); 84 AutoPaintFilter apf(this, kBitmap_Type, paint);
85 this->INHERITED::onDrawImage(image, left, top, apf.paint()); 85 this->INHERITED::onDrawImage(image, left, top, apf.paint());
86 } 86 }
87 87
88 void SkPaintFilterCanvas::onDrawImageRect(const SkImage* image, const SkRect* sr c, 88 void SkPaintFilterCanvas::onDrawImageRect(const SkImage* image, const SkRect* sr c,
89 const SkRect& dst, const SkPaint* pain t) { 89 const SkRect& dst, const SkPaint* pain t
90 SRC_RECT_CONSTRAINT_PARAM(constraint)) {
90 AutoPaintFilter apf(this, kBitmap_Type, paint); 91 AutoPaintFilter apf(this, kBitmap_Type, paint);
91 this->INHERITED::onDrawImageRect(image, src, dst, apf.paint()); 92 this->INHERITED::onDrawImageRect(image, src, dst, apf.paint()
93 SRC_RECT_CONSTRAINT_ARG(constraint));
92 } 94 }
93 95
94 void SkPaintFilterCanvas::onDrawBitmapNine(const SkBitmap& bm, const SkIRect& ce nter, 96 void SkPaintFilterCanvas::onDrawBitmapNine(const SkBitmap& bm, const SkIRect& ce nter,
95 const SkRect& dst, const SkPaint* pai nt) { 97 const SkRect& dst, const SkPaint* pai nt) {
96 AutoPaintFilter apf(this, kBitmap_Type, paint); 98 AutoPaintFilter apf(this, kBitmap_Type, paint);
97 this->INHERITED::onDrawBitmapNine(bm, center, dst, apf.paint()); 99 this->INHERITED::onDrawBitmapNine(bm, center, dst, apf.paint());
98 } 100 }
99 101
100 void SkPaintFilterCanvas::onDrawSprite(const SkBitmap& bm, int left, int top, 102 void SkPaintFilterCanvas::onDrawSprite(const SkBitmap& bm, int left, int top,
101 const SkPaint* paint) { 103 const SkPaint* paint) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 const SkMatrix* matrix, const SkPaint & paint) { 150 const SkMatrix* matrix, const SkPaint & paint) {
149 AutoPaintFilter apf(this, kText_Type, paint); 151 AutoPaintFilter apf(this, kText_Type, paint);
150 this->INHERITED::onDrawTextOnPath(text, byteLength, path, matrix, *apf.paint ()); 152 this->INHERITED::onDrawTextOnPath(text, byteLength, path, matrix, *apf.paint ());
151 } 153 }
152 154
153 void SkPaintFilterCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkS calar y, 155 void SkPaintFilterCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkS calar y,
154 const SkPaint& paint) { 156 const SkPaint& paint) {
155 AutoPaintFilter apf(this, kTextBlob_Type, paint); 157 AutoPaintFilter apf(this, kTextBlob_Type, paint);
156 this->INHERITED::onDrawTextBlob(blob, x, y, *apf.paint()); 158 this->INHERITED::onDrawTextBlob(blob, x, y, *apf.paint());
157 } 159 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698