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

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

Issue 1211583003: add drawImageNine (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address comments from #9 Created 5 years, 5 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/SkRecorder.h ('k') | src/core/SkRecords.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 2014 Google Inc. 2 * Copyright 2014 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 "SkBigPicture.h" 8 #include "SkBigPicture.h"
9 #include "SkPatchUtils.h" 9 #include "SkPatchUtils.h"
10 #include "SkPicture.h" 10 #include "SkPicture.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 const SkPaint* paint) { 215 const SkPaint* paint) {
216 APPEND(DrawImage, this->copy(paint), image, left, top); 216 APPEND(DrawImage, this->copy(paint), image, left, top);
217 } 217 }
218 218
219 void SkRecorder::onDrawImageRect(const SkImage* image, const SkRect* src, 219 void SkRecorder::onDrawImageRect(const SkImage* image, const SkRect* src,
220 const SkRect& dst, 220 const SkRect& dst,
221 const SkPaint* paint) { 221 const SkPaint* paint) {
222 APPEND(DrawImageRect, this->copy(paint), image, this->copy(src), dst); 222 APPEND(DrawImageRect, this->copy(paint), image, this->copy(src), dst);
223 } 223 }
224 224
225 void SkRecorder::onDrawImageNine(const SkImage* image, const SkIRect& center,
226 const SkRect& dst, const SkPaint* paint) {
227 APPEND(DrawImageNine, this->copy(paint), image, center, dst);
228 }
229
225 void SkRecorder::onDrawSprite(const SkBitmap& bitmap, int left, int top, const S kPaint* paint) { 230 void SkRecorder::onDrawSprite(const SkBitmap& bitmap, int left, int top, const S kPaint* paint) {
226 APPEND(DrawSprite, this->copy(paint), delay_copy(bitmap), left, top); 231 APPEND(DrawSprite, this->copy(paint), delay_copy(bitmap), left, top);
227 } 232 }
228 233
229 void SkRecorder::onDrawText(const void* text, size_t byteLength, 234 void SkRecorder::onDrawText(const void* text, size_t byteLength,
230 SkScalar x, SkScalar y, const SkPaint& paint) { 235 SkScalar x, SkScalar y, const SkPaint& paint) {
231 APPEND(DrawText, 236 APPEND(DrawText,
232 delay_copy(paint), this->copy((const char*)text, byteLength), byteLen gth, x, y); 237 delay_copy(paint), this->copy((const char*)text, byteLength), byteLen gth, x, y);
233 } 238 }
234 239
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 INHERITED(onClipPath, path, op, edgeStyle); 361 INHERITED(onClipPath, path, op, edgeStyle);
357 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); 362 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle);
358 APPEND(ClipPath, this->devBounds(), delay_copy(path), opAA); 363 APPEND(ClipPath, this->devBounds(), delay_copy(path), opAA);
359 } 364 }
360 365
361 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 366 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
362 INHERITED(onClipRegion, deviceRgn, op); 367 INHERITED(onClipRegion, deviceRgn, op);
363 APPEND(ClipRegion, this->devBounds(), delay_copy(deviceRgn), op); 368 APPEND(ClipRegion, this->devBounds(), delay_copy(deviceRgn), op);
364 } 369 }
365 370
OLDNEW
« no previous file with comments | « src/core/SkRecorder.h ('k') | src/core/SkRecords.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698