| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkBitmapDevice.h" | 8 #include "SkBitmapDevice.h" |
| 9 #include "SkConfig8888.h" | 9 #include "SkConfig8888.h" |
| 10 #include "SkDraw.h" | 10 #include "SkDraw.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 SkPath path; | 225 SkPath path; |
| 226 path.addOval(oval); | 226 path.addOval(oval); |
| 227 // call the VIRTUAL version, so any subclasses who do handle drawPath aren't | 227 // call the VIRTUAL version, so any subclasses who do handle drawPath aren't |
| 228 // required to override drawOval. | 228 // required to override drawOval. |
| 229 this->drawPath(draw, path, paint, NULL, true); | 229 this->drawPath(draw, path, paint, NULL, true); |
| 230 } | 230 } |
| 231 | 231 |
| 232 void SkBitmapDevice::drawRRect(const SkDraw& draw, const SkRRect& rrect, const S
kPaint& paint) { | 232 void SkBitmapDevice::drawRRect(const SkDraw& draw, const SkRRect& rrect, const S
kPaint& paint) { |
| 233 CHECK_FOR_ANNOTATION(paint); | 233 CHECK_FOR_ANNOTATION(paint); |
| 234 | 234 |
| 235 SkPath path; | 235 draw.drawRRect(rrect, paint); |
| 236 path.addRRect(rrect); | |
| 237 // call the VIRTUAL version, so any subclasses who do handle drawPath aren't | |
| 238 // required to override drawRRect. | |
| 239 this->drawPath(draw, path, paint, NULL, true); | |
| 240 } | 236 } |
| 241 | 237 |
| 242 void SkBitmapDevice::drawPath(const SkDraw& draw, const SkPath& path, | 238 void SkBitmapDevice::drawPath(const SkDraw& draw, const SkPath& path, |
| 243 const SkPaint& paint, const SkMatrix* prePathMatri
x, | 239 const SkPaint& paint, const SkMatrix* prePathMatri
x, |
| 244 bool pathIsMutable) { | 240 bool pathIsMutable) { |
| 245 CHECK_FOR_ANNOTATION(paint); | 241 CHECK_FOR_ANNOTATION(paint); |
| 246 draw.drawPath(path, paint, prePathMatrix, pathIsMutable); | 242 draw.drawPath(path, paint, prePathMatrix, pathIsMutable); |
| 247 } | 243 } |
| 248 | 244 |
| 249 void SkBitmapDevice::drawBitmap(const SkDraw& draw, const SkBitmap& bitmap, | 245 void SkBitmapDevice::drawBitmap(const SkDraw& draw, const SkBitmap& bitmap, |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 paint.getStyle() != SkPaint::kFill_Style || | 396 paint.getStyle() != SkPaint::kFill_Style || |
| 401 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { | 397 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { |
| 402 // turn off lcd | 398 // turn off lcd |
| 403 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; | 399 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; |
| 404 flags->fHinting = paint.getHinting(); | 400 flags->fHinting = paint.getHinting(); |
| 405 return true; | 401 return true; |
| 406 } | 402 } |
| 407 // we're cool with the paint as is | 403 // we're cool with the paint as is |
| 408 return false; | 404 return false; |
| 409 } | 405 } |
| OLD | NEW |