| 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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 fContext->drawRect(grPaint, rect, doStroke ? width : -1); | 706 fContext->drawRect(grPaint, rect, doStroke ? width : -1); |
| 707 } | 707 } |
| 708 | 708 |
| 709 /////////////////////////////////////////////////////////////////////////////// | 709 /////////////////////////////////////////////////////////////////////////////// |
| 710 | 710 |
| 711 void SkGpuDevice::drawRRect(const SkDraw& draw, const SkRRect& rect, | 711 void SkGpuDevice::drawRRect(const SkDraw& draw, const SkRRect& rect, |
| 712 const SkPaint& paint) { | 712 const SkPaint& paint) { |
| 713 CHECK_FOR_NODRAW_ANNOTATION(paint); | 713 CHECK_FOR_NODRAW_ANNOTATION(paint); |
| 714 CHECK_SHOULD_DRAW(draw, false); | 714 CHECK_SHOULD_DRAW(draw, false); |
| 715 | 715 |
| 716 bool usePath = !rect.isSimple() || !paint.isAntiAlias(); | 716 bool usePath = !rect.isSimple(); |
| 717 // another two reasons we might need to call drawPath... | 717 // another two reasons we might need to call drawPath... |
| 718 if (paint.getMaskFilter() || paint.getPathEffect()) { | 718 if (paint.getMaskFilter() || paint.getPathEffect()) { |
| 719 usePath = true; | 719 usePath = true; |
| 720 } | 720 } |
| 721 // until we can rotate rrects... | 721 // until we can rotate rrects... |
| 722 if (!usePath && !fContext->getMatrix().rectStaysRect()) { | 722 if (!usePath && !fContext->getMatrix().rectStaysRect()) { |
| 723 usePath = true; | 723 usePath = true; |
| 724 } | 724 } |
| 725 | 725 |
| 726 if (usePath) { | 726 if (usePath) { |
| (...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1858 GrTexture* texture, | 1858 GrTexture* texture, |
| 1859 bool needClear) | 1859 bool needClear) |
| 1860 : SkDevice(make_bitmap(context, texture->asRenderTarget())) { | 1860 : SkDevice(make_bitmap(context, texture->asRenderTarget())) { |
| 1861 | 1861 |
| 1862 GrAssert(texture && texture->asRenderTarget()); | 1862 GrAssert(texture && texture->asRenderTarget()); |
| 1863 // This constructor is called from onCreateCompatibleDevice. It has locked t
he RT in the texture | 1863 // This constructor is called from onCreateCompatibleDevice. It has locked t
he RT in the texture |
| 1864 // cache. We pass true for the third argument so that it will get unlocked. | 1864 // cache. We pass true for the third argument so that it will get unlocked. |
| 1865 this->initFromRenderTarget(context, texture->asRenderTarget(), true); | 1865 this->initFromRenderTarget(context, texture->asRenderTarget(), true); |
| 1866 fNeedClear = needClear; | 1866 fNeedClear = needClear; |
| 1867 } | 1867 } |
| OLD | NEW |