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

Side by Side Diff: src/utils/android/SkAndroidSDKCanvas.cpp

Issue 1228083004: add src-rect-constraint to drawImageRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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 | « src/utils/android/SkAndroidSDKCanvas.h ('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 "SkAndroidSDKCanvas.h" 8 #include "SkAndroidSDKCanvas.h"
9 9
10 #include "SkColorFilter.h" 10 #include "SkColorFilter.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 SkScalar left, 136 SkScalar left,
137 SkScalar top, 137 SkScalar top,
138 const SkPaint* paint) { 138 const SkPaint* paint) {
139 FILTER_PTR(paint); 139 FILTER_PTR(paint);
140 fProxyTarget->drawBitmap(bitmap, left, top, filteredPaint); 140 fProxyTarget->drawBitmap(bitmap, left, top, filteredPaint);
141 } 141 }
142 void SkAndroidSDKCanvas::onDrawBitmapRect(const SkBitmap& bitmap, 142 void SkAndroidSDKCanvas::onDrawBitmapRect(const SkBitmap& bitmap,
143 const SkRect* src, 143 const SkRect* src,
144 const SkRect& dst, 144 const SkRect& dst,
145 const SkPaint* paint, 145 const SkPaint* paint,
146 DrawBitmapRectFlags flags) { 146 SK_VIRTUAL_CONSTRAINT_TYPE co nstraint) {
147 FILTER_PTR(paint); 147 FILTER_PTR(paint);
148 fProxyTarget->drawBitmapRectToRect(bitmap, src, dst, filteredPaint, flags); 148 fProxyTarget->drawBitmapRect(bitmap, src, dst, filteredPaint,
149 (SrcRectConstraint)constraint);
149 } 150 }
150 void SkAndroidSDKCanvas::onDrawBitmapNine(const SkBitmap& bitmap, 151 void SkAndroidSDKCanvas::onDrawBitmapNine(const SkBitmap& bitmap,
151 const SkIRect& center, 152 const SkIRect& center,
152 const SkRect& dst, 153 const SkRect& dst,
153 const SkPaint* paint) { 154 const SkPaint* paint) {
154 FILTER_PTR(paint); 155 FILTER_PTR(paint);
155 fProxyTarget->drawBitmapNine(bitmap, center, dst, filteredPaint); 156 fProxyTarget->drawBitmapNine(bitmap, center, dst, filteredPaint);
156 } 157 }
157 void SkAndroidSDKCanvas::onDrawSprite(const SkBitmap& bitmap, 158 void SkAndroidSDKCanvas::onDrawSprite(const SkBitmap& bitmap,
158 int left, 159 int left,
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 fProxyTarget->clipPath(path, op, style); 341 fProxyTarget->clipPath(path, op, style);
341 } 342 }
342 343
343 void SkAndroidSDKCanvas::onClipRegion(const SkRegion& region, SkRegion::Op op) { 344 void SkAndroidSDKCanvas::onClipRegion(const SkRegion& region, SkRegion::Op op) {
344 fProxyTarget->clipRegion(region, op); 345 fProxyTarget->clipRegion(region, op);
345 } 346 }
346 347
347 void SkAndroidSDKCanvas::onDiscard() { fProxyTarget->discard(); } 348 void SkAndroidSDKCanvas::onDiscard() { fProxyTarget->discard(); }
348 349
349 350
OLDNEW
« no previous file with comments | « src/utils/android/SkAndroidSDKCanvas.h ('k') | src/utils/debugger/SkDebugCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698