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

Side by Side Diff: src/device/xps/SkXPSDevice.cpp

Issue 70443002: Override drawRRect in fake SkBitmapDevices. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « include/device/xps/SkXPSDevice.h ('k') | src/utils/SkDeferredCanvas.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 2011 Google Inc. 2 * Copyright 2011 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 #ifndef UNICODE 8 #ifndef UNICODE
9 #define UNICODE 9 #define UNICODE
10 #endif 10 #endif
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 1196
1197 this->internalDrawRect(d, r, false, *fillPaint); 1197 this->internalDrawRect(d, r, false, *fillPaint);
1198 } 1198 }
1199 1199
1200 void SkXPSDevice::drawRect(const SkDraw& d, 1200 void SkXPSDevice::drawRect(const SkDraw& d,
1201 const SkRect& r, 1201 const SkRect& r,
1202 const SkPaint& paint) { 1202 const SkPaint& paint) {
1203 this->internalDrawRect(d, r, true, paint); 1203 this->internalDrawRect(d, r, true, paint);
1204 } 1204 }
1205 1205
1206 void SkXPSDevice::drawRRect(const SkDraw& d,
1207 const SkRRect& rr,
1208 const SkPaint& paint) {
1209 SkPath path;
1210 path.addRRect(rr);
1211 this->drawPath(d, path, paint, NULL, true);
1212 }
1213
1206 void SkXPSDevice::internalDrawRect(const SkDraw& d, 1214 void SkXPSDevice::internalDrawRect(const SkDraw& d,
1207 const SkRect& r, 1215 const SkRect& r,
1208 bool transformRect, 1216 bool transformRect,
1209 const SkPaint& paint) { 1217 const SkPaint& paint) {
1210 //Exit early if there is nothing to draw. 1218 //Exit early if there is nothing to draw.
1211 if (d.fClip->isEmpty() || 1219 if (d.fClip->isEmpty() ||
1212 (paint.getAlpha() == 0 && paint.getXfermode() == NULL)) { 1220 (paint.getAlpha() == 0 && paint.getXfermode() == NULL)) {
1213 return; 1221 return;
1214 } 1222 }
1215 1223
(...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after
2444 IID_PPV_ARGS(&this->fXpsFactory)), 2452 IID_PPV_ARGS(&this->fXpsFactory)),
2445 "Could not create factory for layer."); 2453 "Could not create factory for layer.");
2446 2454
2447 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), 2455 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas),
2448 "Could not create canvas for layer."); 2456 "Could not create canvas for layer.");
2449 } 2457 }
2450 2458
2451 bool SkXPSDevice::allowImageFilter(SkImageFilter*) { 2459 bool SkXPSDevice::allowImageFilter(SkImageFilter*) {
2452 return false; 2460 return false;
2453 } 2461 }
OLDNEW
« no previous file with comments | « include/device/xps/SkXPSDevice.h ('k') | src/utils/SkDeferredCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698