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

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

Issue 2205273003: Add onDrawBitmapLattice(), avoid unnecessary bitmap->image copy (Closed) Base URL: https://skia.googlesource.com/skia.git@copypaste
Patch Set: Add support for SkLiteRecorder 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
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 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 "SkLiteDL.h" 8 #include "SkLiteDL.h"
9 #include "SkLiteRecorder.h" 9 #include "SkLiteRecorder.h"
10 #include "SkSurface.h" 10 #include "SkSurface.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 void SkLiteRecorder::onDrawBitmapNine(const SkBitmap& bm, 115 void SkLiteRecorder::onDrawBitmapNine(const SkBitmap& bm,
116 const SkIRect& center, const SkRect& dst, 116 const SkIRect& center, const SkRect& dst,
117 const SkPaint* paint) { 117 const SkPaint* paint) {
118 fDL->drawBitmapNine(bm, center, dst, paint); 118 fDL->drawBitmapNine(bm, center, dst, paint);
119 } 119 }
120 void SkLiteRecorder::onDrawBitmapRect(const SkBitmap& bm, 120 void SkLiteRecorder::onDrawBitmapRect(const SkBitmap& bm,
121 const SkRect* src, const SkRect& dst, 121 const SkRect* src, const SkRect& dst,
122 const SkPaint* paint, SrcRectConstraint co nstraint) { 122 const SkPaint* paint, SrcRectConstraint co nstraint) {
123 fDL->drawBitmapRect(bm, src, dst, paint, constraint); 123 fDL->drawBitmapRect(bm, src, dst, paint, constraint);
124 } 124 }
125 void SkLiteRecorder::onDrawBitmapLattice(const SkBitmap& bm,
126 const SkCanvas::Lattice& lattice, const SkRect& dst,
127 const SkPaint* paint) {
128 fDL->drawBitmapLattice(bm, lattice, dst, paint);
129 }
125 130
126 void SkLiteRecorder::onDrawImage(const SkImage* img, 131 void SkLiteRecorder::onDrawImage(const SkImage* img,
127 SkScalar x, SkScalar y, 132 SkScalar x, SkScalar y,
128 const SkPaint* paint) { 133 const SkPaint* paint) {
129 fDL->drawImage(img, x,y, paint); 134 fDL->drawImage(img, x,y, paint);
130 } 135 }
131 void SkLiteRecorder::onDrawImageNine(const SkImage* img, 136 void SkLiteRecorder::onDrawImageNine(const SkImage* img,
132 const SkIRect& center, const SkRect& dst, 137 const SkIRect& center, const SkRect& dst,
133 const SkPaint* paint) { 138 const SkPaint* paint) {
134 fDL->drawImageNine(img, center, dst, paint); 139 fDL->drawImageNine(img, center, dst, paint);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 } 180 }
176 181
177 void SkLiteRecorder::didTranslateZ(SkScalar dz) { 182 void SkLiteRecorder::didTranslateZ(SkScalar dz) {
178 fDL->translateZ(dz); 183 fDL->translateZ(dz);
179 } 184 }
180 void SkLiteRecorder::onDrawShadowedPicture(const SkPicture* picture, 185 void SkLiteRecorder::onDrawShadowedPicture(const SkPicture* picture,
181 const SkMatrix* matrix, 186 const SkMatrix* matrix,
182 const SkPaint* paint) { 187 const SkPaint* paint) {
183 fDL->drawShadowedPicture(picture, matrix, paint); 188 fDL->drawShadowedPicture(picture, matrix, paint);
184 } 189 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698