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

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

Issue 20806003: Plumb in "bleed" flag (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Addressed pipe-specific issues and updated to ToT Created 7 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 | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SkDevice.h" 8 #include "SkDevice.h"
9 #include "SkDeviceProperties.h" 9 #include "SkDeviceProperties.h"
10 #include "SkDraw.h" 10 #include "SkDraw.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 draw.drawPath(path, paint, prePathMatrix, pathIsMutable); 370 draw.drawPath(path, paint, prePathMatrix, pathIsMutable);
371 } 371 }
372 372
373 void SkDevice::drawBitmap(const SkDraw& draw, const SkBitmap& bitmap, 373 void SkDevice::drawBitmap(const SkDraw& draw, const SkBitmap& bitmap,
374 const SkMatrix& matrix, const SkPaint& paint) { 374 const SkMatrix& matrix, const SkPaint& paint) {
375 draw.drawBitmap(bitmap, matrix, paint); 375 draw.drawBitmap(bitmap, matrix, paint);
376 } 376 }
377 377
378 void SkDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap, 378 void SkDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap,
379 const SkRect* src, const SkRect& dst, 379 const SkRect* src, const SkRect& dst,
380 const SkPaint& paint) { 380 const SkPaint& paint,
381 SkCanvas::DrawBitmapRectFlags flags) {
381 SkMatrix matrix; 382 SkMatrix matrix;
382 SkRect bitmapBounds, tmpSrc, tmpDst; 383 SkRect bitmapBounds, tmpSrc, tmpDst;
383 SkBitmap tmpBitmap; 384 SkBitmap tmpBitmap;
384 385
385 bitmapBounds.isetWH(bitmap.width(), bitmap.height()); 386 bitmapBounds.isetWH(bitmap.width(), bitmap.height());
386 387
387 // Compute matrix from the two rectangles 388 // Compute matrix from the two rectangles
388 if (src) { 389 if (src) {
389 tmpSrc = *src; 390 tmpSrc = *src;
390 } else { 391 } else {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 paint.getStyle() != SkPaint::kFill_Style || 524 paint.getStyle() != SkPaint::kFill_Style ||
524 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { 525 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) {
525 // turn off lcd 526 // turn off lcd
526 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; 527 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag;
527 flags->fHinting = paint.getHinting(); 528 flags->fHinting = paint.getHinting();
528 return true; 529 return true;
529 } 530 }
530 // we're cool with the paint as is 531 // we're cool with the paint as is
531 return false; 532 return false;
532 } 533 }
OLDNEW
« include/core/SkCanvas.h ('K') | « src/core/SkCanvas.cpp ('k') | src/core/SkPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698