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

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

Issue 174243003: add SkCanvas::drawDRRect (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkBBoxRecord.h ('k') | src/core/SkCanvas.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkBBoxRecord.h" 9 #include "SkBBoxRecord.h"
10 10
11 void SkBBoxRecord::drawOval(const SkRect& rect, const SkPaint& paint) { 11 void SkBBoxRecord::drawOval(const SkRect& rect, const SkPaint& paint) {
12 if (this->transformBounds(rect, &paint)) { 12 if (this->transformBounds(rect, &paint)) {
13 INHERITED::drawOval(rect, paint); 13 INHERITED::drawOval(rect, paint);
14 } 14 }
15 } 15 }
16 16
17 void SkBBoxRecord::drawRRect(const SkRRect& rrect, const SkPaint& paint) { 17 void SkBBoxRecord::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
18 if (this->transformBounds(rrect.rect(), &paint)) { 18 if (this->transformBounds(rrect.rect(), &paint)) {
19 INHERITED::drawRRect(rrect, paint); 19 INHERITED::drawRRect(rrect, paint);
20 } 20 }
21 } 21 }
22 22
23 void SkBBoxRecord::drawRect(const SkRect& rect, const SkPaint& paint) { 23 void SkBBoxRecord::drawRect(const SkRect& rect, const SkPaint& paint) {
24 if (this->transformBounds(rect, &paint)) { 24 if (this->transformBounds(rect, &paint)) {
25 INHERITED::drawRect(rect, paint); 25 INHERITED::drawRect(rect, paint);
26 } 26 }
27 } 27 }
28 28
29 void SkBBoxRecord::onDrawDRRect(const SkRRect& outer, const SkRRect& inner,
30 const SkPaint& paint) {
31 if (this->transformBounds(outer.rect(), &paint)) {
32 this->INHERITED::onDrawDRRect(outer, inner, paint);
33 }
34 }
35
29 void SkBBoxRecord::drawPath(const SkPath& path, const SkPaint& paint) { 36 void SkBBoxRecord::drawPath(const SkPath& path, const SkPaint& paint) {
30 if (path.isInverseFillType()) { 37 if (path.isInverseFillType()) {
31 // If path is inverse filled, use the current clip bounds as the 38 // If path is inverse filled, use the current clip bounds as the
32 // path's device-space bounding box. 39 // path's device-space bounding box.
33 SkIRect clipBounds; 40 SkIRect clipBounds;
34 if (this->getClipDeviceBounds(&clipBounds)) { 41 if (this->getClipDeviceBounds(&clipBounds)) {
35 this->handleBBox(SkRect::Make(clipBounds)); 42 this->handleBBox(SkRect::Make(clipBounds));
36 INHERITED::drawPath(path, paint); 43 INHERITED::drawPath(path, paint);
37 } 44 }
38 } else if (this->transformBounds(path.getBounds(), &paint)) { 45 } else if (this->transformBounds(path.getBounds(), &paint)) {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } 293 }
287 294
288 if (!outBounds.isEmpty() && !this->quickReject(outBounds)) { 295 if (!outBounds.isEmpty() && !this->quickReject(outBounds)) {
289 this->getTotalMatrix().mapRect(&outBounds); 296 this->getTotalMatrix().mapRect(&outBounds);
290 this->handleBBox(outBounds); 297 this->handleBBox(outBounds);
291 return true; 298 return true;
292 } 299 }
293 300
294 return false; 301 return false;
295 } 302 }
OLDNEW
« no previous file with comments | « src/core/SkBBoxRecord.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698