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

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

Issue 1412013002: SkRemote: impl drawRRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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/SkRemote.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 2015 Google Inc. 2 * Copyright 2015 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 "SkPath.h" 8 #include "SkPath.h"
9 #include "SkRect.h" 9 #include "SkRect.h"
10 #include "SkRemote.h" 10 #include "SkRemote.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 path.addOval(oval); 200 path.addOval(oval);
201 this->onDrawPath(path, paint); 201 this->onDrawPath(path, paint);
202 } 202 }
203 203
204 void Client::onDrawRect(const SkRect& rect, const SkPaint& paint) { 204 void Client::onDrawRect(const SkRect& rect, const SkPaint& paint) {
205 SkPath path; 205 SkPath path;
206 path.addRect(rect); 206 path.addRect(rect);
207 this->onDrawPath(path, paint); 207 this->onDrawPath(path, paint);
208 } 208 }
209 209
210 void Client::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) {
211 SkPath path;
212 path.addRRect(rrect);
213 this->onDrawPath(path, paint);
214 }
215
210 void Client::onDrawDRRect(const SkRRect& outside, 216 void Client::onDrawDRRect(const SkRRect& outside,
211 const SkRRect& inside, 217 const SkRRect& inside,
212 const SkPaint& paint) { 218 const SkPaint& paint) {
213 SkPath path; 219 SkPath path;
214 path.addRRect(outside); 220 path.addRRect(outside);
215 path.addRRect(inside, SkPath::kCCW_Direction); 221 path.addRRect(inside, SkPath::kCCW_Direction);
216 this->onDrawPath(path, paint); 222 this->onDrawPath(path, paint);
217 } 223 }
218 224
219 void Client::onDrawPath(const SkPath& path, const SkPaint& paint) { 225 void Client::onDrawPath(const SkPath& path, const SkPaint& paint) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } 292 }
287 void Server::strokePath(ID path, ID misc, ID stroke) { 293 void Server::strokePath(ID path, ID misc, ID stroke) {
288 SkPaint paint; 294 SkPaint paint;
289 paint.setStyle(SkPaint::kStroke_Style); 295 paint.setStyle(SkPaint::kStroke_Style);
290 fMisc .find(misc ).applyTo(&paint); 296 fMisc .find(misc ).applyTo(&paint);
291 fStroke.find(stroke).applyTo(&paint); 297 fStroke.find(stroke).applyTo(&paint);
292 fCanvas->drawPath(fPath.find(path), paint); 298 fCanvas->drawPath(fPath.find(path), paint);
293 } 299 }
294 300
295 } // namespace SkRemote 301 } // namespace SkRemote
OLDNEW
« no previous file with comments | « src/core/SkRemote.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698