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

Side by Side Diff: src/utils/SkPictureUtils.cpp

Issue 19977003: drawBitmap* cleanup (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fixed bugs 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
« no previous file with comments | « src/utils/SkDeferredCanvas.cpp ('k') | tests/DeferredCanvasTest.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 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 "SkPictureUtils.h" 8 #include "SkPictureUtils.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 virtual void drawOval(const SkDraw&, const SkRect&, 96 virtual void drawOval(const SkDraw&, const SkRect&,
97 const SkPaint& paint) SK_OVERRIDE { 97 const SkPaint& paint) SK_OVERRIDE {
98 this->addBitmapFromPaint(paint); 98 this->addBitmapFromPaint(paint);
99 } 99 }
100 virtual void drawPath(const SkDraw&, const SkPath& path, 100 virtual void drawPath(const SkDraw&, const SkPath& path,
101 const SkPaint& paint, const SkMatrix* prePathMatrix, 101 const SkPaint& paint, const SkMatrix* prePathMatrix,
102 bool pathIsMutable) SK_OVERRIDE { 102 bool pathIsMutable) SK_OVERRIDE {
103 this->addBitmapFromPaint(paint); 103 this->addBitmapFromPaint(paint);
104 } 104 }
105 virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap, 105 virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap,
106 const SkIRect* srcRectOrNull,
107 const SkMatrix&, const SkPaint&) SK_OVERRIDE { 106 const SkMatrix&, const SkPaint&) SK_OVERRIDE {
108 this->addBitmap(bitmap); 107 this->addBitmap(bitmap);
109 } 108 }
110 virtual void drawBitmapRect(const SkDraw&, const SkBitmap& bitmap, 109 virtual void drawBitmapRect(const SkDraw&, const SkBitmap& bitmap,
111 const SkRect* srcOrNull, const SkRect& dst, 110 const SkRect* srcOrNull, const SkRect& dst,
112 const SkPaint&) SK_OVERRIDE { 111 const SkPaint&) SK_OVERRIDE {
113 this->addBitmap(bitmap); 112 this->addBitmap(bitmap);
114 } 113 }
115 virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, 114 virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap,
116 int x, int y, const SkPaint& paint) SK_OVERRIDE { 115 int x, int y, const SkPaint& paint) SK_OVERRIDE {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 canvas.clipRect(area, SkRegion::kIntersect_Op, false); 215 canvas.clipRect(area, SkRegion::kIntersect_Op, false);
217 canvas.drawPicture(*pict); 216 canvas.drawPicture(*pict);
218 217
219 SkData* data = NULL; 218 SkData* data = NULL;
220 int count = array.count(); 219 int count = array.count();
221 if (count > 0) { 220 if (count > 0) {
222 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*) ); 221 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*) );
223 } 222 }
224 return data; 223 return data;
225 } 224 }
OLDNEW
« no previous file with comments | « src/utils/SkDeferredCanvas.cpp ('k') | tests/DeferredCanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698