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

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

Issue 1992283002: Add drawBitmapLattice() API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rewrite picture impls Created 4 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
« no previous file with comments | « src/core/SkRecorder.h ('k') | src/gpu/SkGpuDevice.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 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 "SkCanvasPriv.h" 9 #include "SkCanvasPriv.h"
10 #include "SkImage.h" 10 #include "SkImage.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 if (image) { 204 if (image) {
205 this->onDrawImageNine(image.get(), center, dst, paint); 205 this->onDrawImageNine(image.get(), center, dst, paint);
206 } 206 }
207 } 207 }
208 208
209 void SkRecorder::onDrawImage(const SkImage* image, SkScalar left, SkScalar top, 209 void SkRecorder::onDrawImage(const SkImage* image, SkScalar left, SkScalar top,
210 const SkPaint* paint) { 210 const SkPaint* paint) {
211 APPEND(DrawImage, this->copy(paint), sk_ref_sp(image), left, top); 211 APPEND(DrawImage, this->copy(paint), sk_ref_sp(image), left, top);
212 } 212 }
213 213
214 void SkRecorder::onDrawImageLattice(const SkImage* image,
215 const Lattice& lattice,
216 const SkRect& dst,
217 const SkPaint* paint) {
218 APPEND(DrawImageLattice, this->copy(paint), sk_ref_sp(image),
219 lattice.fXCount, this->copy(lattice.fXDivs, lattice.fXCount),
220 lattice.fYCount, this->copy(lattice.fYDivs, lattice.fYCount), dst);
221 }
222
223
214 void SkRecorder::onDrawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst, 224 void SkRecorder::onDrawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst,
215 const SkPaint* paint, SrcRectConstraint constra int) { 225 const SkPaint* paint, SrcRectConstraint constra int) {
216 APPEND(DrawImageRect, this->copy(paint), sk_ref_sp(image), this->copy(src), dst, constraint); 226 APPEND(DrawImageRect, this->copy(paint), sk_ref_sp(image), this->copy(src), dst, constraint);
217 } 227 }
218 228
219 void SkRecorder::onDrawImageNine(const SkImage* image, const SkIRect& center, 229 void SkRecorder::onDrawImageNine(const SkImage* image, const SkIRect& center,
220 const SkRect& dst, const SkPaint* paint) { 230 const SkRect& dst, const SkPaint* paint) {
221 APPEND(DrawImageNine, this->copy(paint), sk_ref_sp(image), center, dst); 231 APPEND(DrawImageNine, this->copy(paint), sk_ref_sp(image), center, dst);
222 } 232 }
223 233
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 } 402 }
393 403
394 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 404 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
395 INHERITED(onClipRegion, deviceRgn, op); 405 INHERITED(onClipRegion, deviceRgn, op);
396 APPEND(ClipRegion, this->devBounds(), deviceRgn, op); 406 APPEND(ClipRegion, this->devBounds(), deviceRgn, op);
397 } 407 }
398 408
399 sk_sp<SkSurface> SkRecorder::onNewSurface(const SkImageInfo&, const SkSurfacePro ps&) { 409 sk_sp<SkSurface> SkRecorder::onNewSurface(const SkImageInfo&, const SkSurfacePro ps&) {
400 return nullptr; 410 return nullptr;
401 } 411 }
OLDNEW
« no previous file with comments | « src/core/SkRecorder.h ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698