OLD | NEW |
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 #include "SkGpuDevice.h" | 8 #include "SkGpuDevice.h" |
9 | 9 |
10 #include "effects/GrTextureDomainEffect.h" | 10 #include "effects/GrTextureDomainEffect.h" |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 | 590 |
591 // must be in SkCanvas::PointMode order | 591 // must be in SkCanvas::PointMode order |
592 static const GrPrimitiveType gPointMode2PrimtiveType[] = { | 592 static const GrPrimitiveType gPointMode2PrimtiveType[] = { |
593 kPoints_GrPrimitiveType, | 593 kPoints_GrPrimitiveType, |
594 kLines_GrPrimitiveType, | 594 kLines_GrPrimitiveType, |
595 kLineStrip_GrPrimitiveType | 595 kLineStrip_GrPrimitiveType |
596 }; | 596 }; |
597 | 597 |
598 void SkGpuDevice::drawPoints(const SkDraw& draw, SkCanvas::PointMode mode, | 598 void SkGpuDevice::drawPoints(const SkDraw& draw, SkCanvas::PointMode mode, |
599 size_t count, const SkPoint pts[], const SkPaint& p
aint) { | 599 size_t count, const SkPoint pts[], const SkPaint& p
aint) { |
| 600 CHECK_FOR_NODRAW_ANNOTATION(paint); |
600 CHECK_SHOULD_DRAW(draw, false); | 601 CHECK_SHOULD_DRAW(draw, false); |
601 | 602 |
602 SkScalar width = paint.getStrokeWidth(); | 603 SkScalar width = paint.getStrokeWidth(); |
603 if (width < 0) { | 604 if (width < 0) { |
604 return; | 605 return; |
605 } | 606 } |
606 | 607 |
607 // we only handle hairlines and paints without path effects or mask filters, | 608 // we only handle hairlines and paints without path effects or mask filters, |
608 // else we let the SkDraw call our drawPath() | 609 // else we let the SkDraw call our drawPath() |
609 if (width > 0 || paint.getPathEffect() || paint.getMaskFilter()) { | 610 if (width > 0 || paint.getPathEffect() || paint.getMaskFilter()) { |
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1833 GrTexture* texture, | 1834 GrTexture* texture, |
1834 bool needClear) | 1835 bool needClear) |
1835 : SkDevice(make_bitmap(context, texture->asRenderTarget())) { | 1836 : SkDevice(make_bitmap(context, texture->asRenderTarget())) { |
1836 | 1837 |
1837 GrAssert(texture && texture->asRenderTarget()); | 1838 GrAssert(texture && texture->asRenderTarget()); |
1838 // This constructor is called from onCreateCompatibleDevice. It has locked t
he RT in the texture | 1839 // This constructor is called from onCreateCompatibleDevice. It has locked t
he RT in the texture |
1839 // cache. We pass true for the third argument so that it will get unlocked. | 1840 // cache. We pass true for the third argument so that it will get unlocked. |
1840 this->initFromRenderTarget(context, texture->asRenderTarget(), true); | 1841 this->initFromRenderTarget(context, texture->asRenderTarget(), true); |
1841 fNeedClear = needClear; | 1842 fNeedClear = needClear; |
1842 } | 1843 } |
OLD | NEW |