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

Side by Side Diff: src/image/SkImage.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 | « src/core/SkCanvas.cpp ('k') | src/image/SkImage_Base.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 2012 Google Inc. 2 * Copyright 2012 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkImagePriv.h" 10 #include "SkImagePriv.h"
(...skipping 15 matching lines...) Expand all
26 do { 26 do {
27 id = sk_atomic_inc(&gUniqueID) + 1; 27 id = sk_atomic_inc(&gUniqueID) + 1;
28 } while (0 == id); 28 } while (0 == id);
29 return id; 29 return id;
30 } 30 }
31 31
32 void SkImage::draw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkPaint* pain t) const { 32 void SkImage::draw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkPaint* pain t) const {
33 as_IB(this)->onDraw(canvas, x, y, paint); 33 as_IB(this)->onDraw(canvas, x, y, paint);
34 } 34 }
35 35
36 void SkImage::draw(SkCanvas* canvas, const SkRect* src, const SkRect& dst, 36 void SkImage::drawRect(SkCanvas* canvas, const SkRect* src, const SkRect& dst,
37 const SkPaint* paint) const { 37 const SkPaint* paint) const {
38 as_IB(this)->onDrawRectToRect(canvas, src, dst, paint); 38 as_IB(this)->onDrawRect(canvas, src, dst, paint);
39 } 39 }
40 40
41 const void* SkImage::peekPixels(SkImageInfo* info, size_t* rowBytes) const { 41 const void* SkImage::peekPixels(SkImageInfo* info, size_t* rowBytes) const {
42 SkImageInfo infoStorage; 42 SkImageInfo infoStorage;
43 size_t rowBytesStorage; 43 size_t rowBytesStorage;
44 if (NULL == info) { 44 if (NULL == info) {
45 info = &infoStorage; 45 info = &infoStorage;
46 } 46 }
47 if (NULL == rowBytes) { 47 if (NULL == rowBytes) {
48 rowBytes = &rowBytesStorage; 48 rowBytes = &rowBytesStorage;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 SkCanvas canvas(*bitmap); 132 SkCanvas canvas(*bitmap);
133 133
134 SkPaint paint; 134 SkPaint paint;
135 paint.setXfermodeMode(SkXfermode::kClear_Mode); 135 paint.setXfermodeMode(SkXfermode::kClear_Mode);
136 canvas.drawRect(dstR, paint); 136 canvas.drawRect(dstR, paint);
137 137
138 canvas.drawImageRect(this, &srcR, dstR); 138 canvas.drawImageRect(this, &srcR, dstR);
139 return true; 139 return true;
140 } 140 }
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/image/SkImage_Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698