| 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/GrBicubicEffect.h" | 10 #include "effects/GrBicubicEffect.h" |
| (...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1758 } | 1758 } |
| 1759 | 1759 |
| 1760 if (paint.getShader() || | 1760 if (paint.getShader() || |
| 1761 paint.getXfermode() || // unless its srcover | 1761 paint.getXfermode() || // unless its srcover |
| 1762 paint.getMaskFilter() || | 1762 paint.getMaskFilter() || |
| 1763 paint.getRasterizer() || | 1763 paint.getRasterizer() || |
| 1764 paint.getColorFilter() || | 1764 paint.getColorFilter() || |
| 1765 paint.getPathEffect() || | 1765 paint.getPathEffect() || |
| 1766 paint.isFakeBoldText() || | 1766 paint.isFakeBoldText() || |
| 1767 paint.getStyle() != SkPaint::kFill_Style) { | 1767 paint.getStyle() != SkPaint::kFill_Style) { |
| 1768 // turn off lcd | 1768 // turn off lcd, but turn on kGenA8 |
| 1769 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; | 1769 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; |
| 1770 flags->fHinting = paint.getHinting(); | 1770 flags->fFlags |= SkPaint::kGenA8FromLCD_Flag; |
| 1771 return true; | 1771 return true; |
| 1772 } | 1772 } |
| 1773 // we're cool with the paint as is | 1773 // we're cool with the paint as is |
| 1774 return false; | 1774 return false; |
| 1775 } | 1775 } |
| 1776 | 1776 |
| 1777 void SkGpuDevice::flush() { | 1777 void SkGpuDevice::flush() { |
| 1778 DO_DEFERRED_CLEAR(); | 1778 DO_DEFERRED_CLEAR(); |
| 1779 fContext->resolveRenderTarget(fRenderTarget); | 1779 fContext->resolveRenderTarget(fRenderTarget); |
| 1780 } | 1780 } |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1942 GrLayerHoister::UnlockLayers(fContext->getLayerCache(), picture); | 1942 GrLayerHoister::UnlockLayers(fContext->getLayerCache(), picture); |
| 1943 | 1943 |
| 1944 return true; | 1944 return true; |
| 1945 } | 1945 } |
| 1946 | 1946 |
| 1947 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 1947 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
| 1948 // We always return a transient cache, so it is freed after each | 1948 // We always return a transient cache, so it is freed after each |
| 1949 // filter traversal. | 1949 // filter traversal. |
| 1950 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); | 1950 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); |
| 1951 } | 1951 } |
| OLD | NEW |