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

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp

Issue 2877833002: Disable 2D canvas deferral on text rendering when compositing (Closed)
Patch Set: x Created 3 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 4 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
5 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 7 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
8 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 8 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
9 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved.
10 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 10 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 846
847 if (!std::isfinite(x) || !std::isfinite(y)) 847 if (!std::isfinite(x) || !std::isfinite(y))
848 return; 848 return;
849 if (max_width && (!std::isfinite(*max_width) || *max_width <= 0)) 849 if (max_width && (!std::isfinite(*max_width) || *max_width <= 0))
850 return; 850 return;
851 851
852 // Currently, SkPictureImageFilter does not support subpixel text 852 // Currently, SkPictureImageFilter does not support subpixel text
853 // anti-aliasing, which is expected when !creationAttributes().alpha(), so we 853 // anti-aliasing, which is expected when !creationAttributes().alpha(), so we
854 // need to fall out of display list mode when drawing text to an opaque 854 // need to fall out of display list mode when drawing text to an opaque
855 // canvas. crbug.com/583809 855 // canvas. crbug.com/583809
856 if (!CreationAttributes().alpha() && !IsComposited()) { 856 if (!IsComposited()) {
857 canvas()->DisableDeferral( 857 canvas()->DisableDeferral(
858 kDisableDeferralReasonSubPixelTextAntiAliasingSupport); 858 kDisableDeferralReasonSubPixelTextAntiAliasingSupport);
859 } 859 }
860 860
861 const Font& font = AccessFont(); 861 const Font& font = AccessFont();
862 font.GetFontDescription().SetSubpixelAscentDescent(true); 862 font.GetFontDescription().SetSubpixelAscentDescent(true);
863 const SimpleFontData* font_data = font.PrimaryFont(); 863 const SimpleFontData* font_data = font.PrimaryFont();
864 DCHECK(font_data); 864 DCHECK(font_data);
865 if (!font_data) 865 if (!font_data)
866 return; 866 return;
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 } 1190 }
1191 return true; 1191 return true;
1192 } 1192 }
1193 1193
1194 void CanvasRenderingContext2D::ResetUsageTracking() { 1194 void CanvasRenderingContext2D::ResetUsageTracking() {
1195 UsageCounters new_counters; 1195 UsageCounters new_counters;
1196 usage_counters_ = new_counters; 1196 usage_counters_ = new_counters;
1197 } 1197 }
1198 1198
1199 } // namespace blink 1199 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698