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

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

Issue 2277053002: Add drawRegion() API to SkCanvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Added shader to test Created 4 years, 3 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
« include/core/SkCanvas.h ('K') | « src/core/SkRecorder.h ('k') | no next file » | 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 const SkPoint pts[], 138 const SkPoint pts[],
139 const SkPaint& paint) { 139 const SkPaint& paint) {
140 APPEND(DrawPoints, paint, mode, SkToUInt(count), this->copy(pts, count)); 140 APPEND(DrawPoints, paint, mode, SkToUInt(count), this->copy(pts, count));
141 } 141 }
142 142
143 void SkRecorder::onDrawRect(const SkRect& rect, const SkPaint& paint) { 143 void SkRecorder::onDrawRect(const SkRect& rect, const SkPaint& paint) {
144 TRY_MINIRECORDER(drawRect, rect, paint); 144 TRY_MINIRECORDER(drawRect, rect, paint);
145 APPEND(DrawRect, paint, rect); 145 APPEND(DrawRect, paint, rect);
146 } 146 }
147 147
148 void SkRecorder::onDrawRegion(const SkRegion& region, const SkPaint& paint) {
149 APPEND(DrawRegion, paint, region);
150 }
151
148 void SkRecorder::onDrawOval(const SkRect& oval, const SkPaint& paint) { 152 void SkRecorder::onDrawOval(const SkRect& oval, const SkPaint& paint) {
149 APPEND(DrawOval, paint, oval); 153 APPEND(DrawOval, paint, oval);
150 } 154 }
151 155
152 void SkRecorder::onDrawArc(const SkRect& oval, SkScalar startAngle, SkScalar swe epAngle, 156 void SkRecorder::onDrawArc(const SkRect& oval, SkScalar startAngle, SkScalar swe epAngle,
153 bool useCenter, const SkPaint& paint) { 157 bool useCenter, const SkPaint& paint) {
154 APPEND(DrawArc, paint, oval, startAngle, sweepAngle, useCenter); 158 APPEND(DrawArc, paint, oval, startAngle, sweepAngle, useCenter);
155 } 159 }
156 160
157 void SkRecorder::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) { 161 void SkRecorder::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) {
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 } 418 }
415 419
416 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 420 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
417 INHERITED(onClipRegion, deviceRgn, op); 421 INHERITED(onClipRegion, deviceRgn, op);
418 APPEND(ClipRegion, this->devBounds(), deviceRgn, op); 422 APPEND(ClipRegion, this->devBounds(), deviceRgn, op);
419 } 423 }
420 424
421 sk_sp<SkSurface> SkRecorder::onNewSurface(const SkImageInfo&, const SkSurfacePro ps&) { 425 sk_sp<SkSurface> SkRecorder::onNewSurface(const SkImageInfo&, const SkSurfacePro ps&) {
422 return nullptr; 426 return nullptr;
423 } 427 }
OLDNEW
« include/core/SkCanvas.h ('K') | « src/core/SkRecorder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698