Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/gpu/SkGpuDevice.cpp

Issue 572933004: when we disable lcd for impl reasons, add kGenA8 to document the original intent (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698