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

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

Issue 1220733006: Add support for drawBitmapRect() to SkMiniRecorder. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: 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/SkRecordDraw.cpp ('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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 SkScalar top, 187 SkScalar top,
188 const SkPaint* paint) { 188 const SkPaint* paint) {
189 APPEND(DrawBitmap, this->copy(paint), delay_copy(bitmap), left, top); 189 APPEND(DrawBitmap, this->copy(paint), delay_copy(bitmap), left, top);
190 } 190 }
191 191
192 void SkRecorder::onDrawBitmapRect(const SkBitmap& bitmap, 192 void SkRecorder::onDrawBitmapRect(const SkBitmap& bitmap,
193 const SkRect* src, 193 const SkRect* src,
194 const SkRect& dst, 194 const SkRect& dst,
195 const SkPaint* paint, 195 const SkPaint* paint,
196 DrawBitmapRectFlags flags) { 196 DrawBitmapRectFlags flags) {
197 TRY_MINIRECORDER(drawBitmapRectToRect, bitmap, src, dst, paint, flags);
197 if (kBleed_DrawBitmapRectFlag == flags) { 198 if (kBleed_DrawBitmapRectFlag == flags) {
198 APPEND(DrawBitmapRectToRectBleed, 199 APPEND(DrawBitmapRectToRectBleed,
199 this->copy(paint), delay_copy(bitmap), this->copy(src), dst); 200 this->copy(paint), delay_copy(bitmap), this->copy(src), dst);
200 return; 201 return;
201 } 202 }
202 SkASSERT(kNone_DrawBitmapRectFlag == flags); 203 SkASSERT(kNone_DrawBitmapRectFlag == flags);
203 APPEND(DrawBitmapRectToRect, 204 APPEND(DrawBitmapRectToRect,
204 this->copy(paint), delay_copy(bitmap), this->copy(src), dst); 205 this->copy(paint), delay_copy(bitmap), this->copy(src), dst);
205 } 206 }
206 207
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 INHERITED(onClipPath, path, op, edgeStyle); 362 INHERITED(onClipPath, path, op, edgeStyle);
362 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); 363 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle);
363 APPEND(ClipPath, this->devBounds(), delay_copy(path), opAA); 364 APPEND(ClipPath, this->devBounds(), delay_copy(path), opAA);
364 } 365 }
365 366
366 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 367 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
367 INHERITED(onClipRegion, deviceRgn, op); 368 INHERITED(onClipRegion, deviceRgn, op);
368 APPEND(ClipRegion, this->devBounds(), delay_copy(deviceRgn), op); 369 APPEND(ClipRegion, this->devBounds(), delay_copy(deviceRgn), op);
369 } 370 }
370 371
OLDNEW
« no previous file with comments | « src/core/SkRecordDraw.cpp ('k') | src/core/SkRecords.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698