| OLD | NEW | 
|---|
| 1 | 1 | 
| 2 /* | 2 /* | 
| 3  * Copyright 2006 The Android Open Source Project | 3  * Copyright 2006 The Android Open Source Project | 
| 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 "SkPaint.h" | 9 #include "SkPaint.h" | 
| 10 #include "SkAnnotation.h" | 10 #include "SkAnnotation.h" | 
| (...skipping 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1808     if (ignoreGamma) { | 1808     if (ignoreGamma) { | 
| 1809         rec.setLuminanceColor(0); | 1809         rec.setLuminanceColor(0); | 
| 1810     } | 1810     } | 
| 1811 | 1811 | 
| 1812     size_t          descSize = sizeof(rec); | 1812     size_t          descSize = sizeof(rec); | 
| 1813     int             entryCount = 1; | 1813     int             entryCount = 1; | 
| 1814     SkPathEffect*   pe = this->getPathEffect(); | 1814     SkPathEffect*   pe = this->getPathEffect(); | 
| 1815     SkMaskFilter*   mf = this->getMaskFilter(); | 1815     SkMaskFilter*   mf = this->getMaskFilter(); | 
| 1816     SkRasterizer*   ra = this->getRasterizer(); | 1816     SkRasterizer*   ra = this->getRasterizer(); | 
| 1817 | 1817 | 
| 1818     SkOrderedWriteBuffer    peBuffer(MIN_SIZE_FOR_EFFECT_BUFFER); | 1818     SkOrderedWriteBuffer    peBuffer, mfBuffer, raBuffer; | 
| 1819     SkOrderedWriteBuffer    mfBuffer(MIN_SIZE_FOR_EFFECT_BUFFER); |  | 
| 1820     SkOrderedWriteBuffer    raBuffer(MIN_SIZE_FOR_EFFECT_BUFFER); |  | 
| 1821 | 1819 | 
| 1822     if (pe) { | 1820     if (pe) { | 
| 1823         peBuffer.writeFlattenable(pe); | 1821         peBuffer.writeFlattenable(pe); | 
| 1824         descSize += peBuffer.size(); | 1822         descSize += peBuffer.size(); | 
| 1825         entryCount += 1; | 1823         entryCount += 1; | 
| 1826         rec.fMaskFormat = SkMask::kA8_Format;   // force antialiasing when we do
       the scan conversion | 1824         rec.fMaskFormat = SkMask::kA8_Format;   // force antialiasing when we do
       the scan conversion | 
| 1827         // seems like we could support kLCD as well at this point... | 1825         // seems like we could support kLCD as well at this point... | 
| 1828     } | 1826     } | 
| 1829     if (mf) { | 1827     if (mf) { | 
| 1830         mfBuffer.writeFlattenable(mf); | 1828         mfBuffer.writeFlattenable(mf); | 
| 1831         descSize += mfBuffer.size(); | 1829         descSize += mfBuffer.size(); | 
| 1832         entryCount += 1; | 1830         entryCount += 1; | 
| 1833         rec.fMaskFormat = SkMask::kA8_Format;   // force antialiasing with maskf
      ilters | 1831         rec.fMaskFormat = SkMask::kA8_Format;   // force antialiasing with maskf
      ilters | 
| 1834         /* Pre-blend is not currently applied to filtered text. | 1832         /* Pre-blend is not currently applied to filtered text. | 
| 1835            The primary filter is blur, for which contrast makes no sense, | 1833            The primary filter is blur, for which contrast makes no sense, | 
| 1836            and for which the destination guess error is more visible. | 1834            and for which the destination guess error is more visible. | 
| 1837            Also, all existing users of blur have calibrated for linear. */ | 1835            Also, all existing users of blur have calibrated for linear. */ | 
| 1838         rec.ignorePreBlend(); | 1836         rec.ignorePreBlend(); | 
| 1839     } | 1837     } | 
| 1840     if (ra) { | 1838     if (ra) { | 
| 1841         raBuffer.writeFlattenable(ra); | 1839         raBuffer.writeFlattenable(ra); | 
| 1842         descSize += raBuffer.size(); | 1840         descSize += raBuffer.size(); | 
| 1843         entryCount += 1; | 1841         entryCount += 1; | 
| 1844         rec.fMaskFormat = SkMask::kA8_Format;   // force antialiasing when we do
       the scan conversion | 1842         rec.fMaskFormat = SkMask::kA8_Format;   // force antialiasing when we do
       the scan conversion | 
| 1845     } | 1843     } | 
| 1846 | 1844 | 
| 1847 #ifdef SK_BUILD_FOR_ANDROID | 1845 #ifdef SK_BUILD_FOR_ANDROID | 
| 1848     SkOrderedWriteBuffer androidBuffer(128); | 1846     SkOrderedWriteBuffer androidBuffer; | 
| 1849     fPaintOptionsAndroid.flatten(androidBuffer); | 1847     fPaintOptionsAndroid.flatten(androidBuffer); | 
| 1850     descSize += androidBuffer.size(); | 1848     descSize += androidBuffer.size(); | 
| 1851     entryCount += 1; | 1849     entryCount += 1; | 
| 1852 #endif | 1850 #endif | 
| 1853 | 1851 | 
| 1854     /////////////////////////////////////////////////////////////////////////// | 1852     /////////////////////////////////////////////////////////////////////////// | 
| 1855     // Now that we're done tweaking the rec, call the PostMakeRec cleanup | 1853     // Now that we're done tweaking the rec, call the PostMakeRec cleanup | 
| 1856     SkScalerContext::PostMakeRec(*this, &rec); | 1854     SkScalerContext::PostMakeRec(*this, &rec); | 
| 1857 | 1855 | 
| 1858     descSize += SkDescriptor::ComputeOverhead(entryCount); | 1856     descSize += SkDescriptor::ComputeOverhead(entryCount); | 
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2579             case SkXfermode::kPlus_Mode: | 2577             case SkXfermode::kPlus_Mode: | 
| 2580                 return 0 == this->getAlpha(); | 2578                 return 0 == this->getAlpha(); | 
| 2581             case SkXfermode::kDst_Mode: | 2579             case SkXfermode::kDst_Mode: | 
| 2582                 return true; | 2580                 return true; | 
| 2583             default: | 2581             default: | 
| 2584                 break; | 2582                 break; | 
| 2585         } | 2583         } | 
| 2586     } | 2584     } | 
| 2587     return false; | 2585     return false; | 
| 2588 } | 2586 } | 
| OLD | NEW | 
|---|