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

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

Issue 605843002: Rename SkImage::draw(_, SkRect, SkRect) in SkImage::drawRect() (Closed) Base URL: https://skia.googlesource.com/skia.git@skimage_draw_forgot
Patch Set: Created 6 years, 2 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/core/SkImage.h ('k') | src/image/SkImage.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 2008 The Android Open Source Project 2 * Copyright 2008 The Android Open Source Project
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 "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkCanvasPriv.h" 9 #include "SkCanvasPriv.h"
10 #include "SkBitmapDevice.h" 10 #include "SkBitmapDevice.h"
(...skipping 1876 matching lines...) Expand 10 before | Expand all | Expand 10 after
1887 } 1887 }
1888 1888
1889 void SkCanvas::drawImage(const SkImage* image, SkScalar left, SkScalar top, 1889 void SkCanvas::drawImage(const SkImage* image, SkScalar left, SkScalar top,
1890 const SkPaint* paint) { 1890 const SkPaint* paint) {
1891 image->draw(this, left, top, paint); 1891 image->draw(this, left, top, paint);
1892 } 1892 }
1893 1893
1894 void SkCanvas::drawImageRect(const SkImage* image, const SkRect* src, 1894 void SkCanvas::drawImageRect(const SkImage* image, const SkRect* src,
1895 const SkRect& dst, 1895 const SkRect& dst,
1896 const SkPaint* paint) { 1896 const SkPaint* paint) {
1897 image->draw(this, src, dst, paint); 1897 image->drawRect(this, src, dst, paint);
1898 } 1898 }
1899 1899
1900 void SkCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, 1900 void SkCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y,
1901 const SkPaint* paint) { 1901 const SkPaint* paint) {
1902 SkDEBUGCODE(bitmap.validate();) 1902 SkDEBUGCODE(bitmap.validate();)
1903 1903
1904 if (NULL == paint || paint->canComputeFastBounds()) { 1904 if (NULL == paint || paint->canComputeFastBounds()) {
1905 SkRect bounds = { 1905 SkRect bounds = {
1906 x, y, 1906 x, y,
1907 x + SkIntToScalar(bitmap.width()), 1907 x + SkIntToScalar(bitmap.width()),
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
2548 } 2548 }
2549 2549
2550 if (matrix) { 2550 if (matrix) {
2551 canvas->concat(*matrix); 2551 canvas->concat(*matrix);
2552 } 2552 }
2553 } 2553 }
2554 2554
2555 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { 2555 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() {
2556 fCanvas->restoreToCount(fSaveCount); 2556 fCanvas->restoreToCount(fSaveCount);
2557 } 2557 }
OLDNEW
« no previous file with comments | « include/core/SkImage.h ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698