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

Side by Side Diff: src/core/SkBitmapDevice.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 | « include/utils/SkPaintFilterCanvas.h ('k') | src/core/SkCanvas.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 2013 Google Inc. 2 * Copyright 2013 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 "SkBitmapDevice.h" 8 #include "SkBitmapDevice.h"
9 #include "SkConfig8888.h" 9 #include "SkConfig8888.h"
10 #include "SkDraw.h" 10 #include "SkDraw.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 draw.drawPath(path, paint, prePathMatrix, pathIsMutable); 230 draw.drawPath(path, paint, prePathMatrix, pathIsMutable);
231 } 231 }
232 232
233 void SkBitmapDevice::drawBitmap(const SkDraw& draw, const SkBitmap& bitmap, 233 void SkBitmapDevice::drawBitmap(const SkDraw& draw, const SkBitmap& bitmap,
234 const SkMatrix& matrix, const SkPaint& paint) { 234 const SkMatrix& matrix, const SkPaint& paint) {
235 draw.drawBitmap(bitmap, matrix, NULL, paint); 235 draw.drawBitmap(bitmap, matrix, NULL, paint);
236 } 236 }
237 237
238 void SkBitmapDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap, 238 void SkBitmapDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap,
239 const SkRect* src, const SkRect& dst, 239 const SkRect* src, const SkRect& dst,
240 const SkPaint& paint, SK_VIRTUAL_CONSTRAINT_ TYPE) { 240 const SkPaint& paint, SkCanvas::SrcRectConst raint constraint) {
241 SkMatrix matrix; 241 SkMatrix matrix;
242 SkRect bitmapBounds, tmpSrc, tmpDst; 242 SkRect bitmapBounds, tmpSrc, tmpDst;
243 SkBitmap tmpBitmap; 243 SkBitmap tmpBitmap;
244 244
245 bitmapBounds.isetWH(bitmap.width(), bitmap.height()); 245 bitmapBounds.isetWH(bitmap.width(), bitmap.height());
246 246
247 // Compute matrix from the two rectangles 247 // Compute matrix from the two rectangles
248 if (src) { 248 if (src) {
249 tmpSrc = *src; 249 tmpSrc = *src;
250 } else { 250 } else {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 paint.getRasterizer() || 374 paint.getRasterizer() ||
375 paint.getPathEffect() || 375 paint.getPathEffect() ||
376 paint.isFakeBoldText() || 376 paint.isFakeBoldText() ||
377 paint.getStyle() != SkPaint::kFill_Style || 377 paint.getStyle() != SkPaint::kFill_Style ||
378 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) 378 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode))
379 { 379 {
380 return true; 380 return true;
381 } 381 }
382 return false; 382 return false;
383 } 383 }
OLDNEW
« no previous file with comments | « include/utils/SkPaintFilterCanvas.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698