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

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

Issue 2359843003: Turning on clip anti-aliasing by default in Chrome. (Closed)
Patch Set: Adding the layout test. Created 4 years, 2 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. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. 8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved.
9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
10 * 10 *
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 CanvasRenderingContext2D::CanvasRenderingContext2D(HTMLCanvasElement* canvas, co nst CanvasContextCreationAttributes& attrs, Document& document) 112 CanvasRenderingContext2D::CanvasRenderingContext2D(HTMLCanvasElement* canvas, co nst CanvasContextCreationAttributes& attrs, Document& document)
113 : CanvasRenderingContext(canvas, nullptr, attrs) 113 : CanvasRenderingContext(canvas, nullptr, attrs)
114 , m_contextLostMode(NotLostContext) 114 , m_contextLostMode(NotLostContext)
115 , m_contextRestorable(true) 115 , m_contextRestorable(true)
116 , m_tryRestoreContextAttemptCount(0) 116 , m_tryRestoreContextAttemptCount(0)
117 , m_dispatchContextLostEventTimer(this, &CanvasRenderingContext2D::dispatchC ontextLostEvent) 117 , m_dispatchContextLostEventTimer(this, &CanvasRenderingContext2D::dispatchC ontextLostEvent)
118 , m_dispatchContextRestoredEventTimer(this, &CanvasRenderingContext2D::dispa tchContextRestoredEvent) 118 , m_dispatchContextRestoredEventTimer(this, &CanvasRenderingContext2D::dispa tchContextRestoredEvent)
119 , m_tryRestoreContextEventTimer(this, &CanvasRenderingContext2D::tryRestoreC ontextEvent) 119 , m_tryRestoreContextEventTimer(this, &CanvasRenderingContext2D::tryRestoreC ontextEvent)
120 , m_pruneLocalFontCacheScheduled(false) 120 , m_pruneLocalFontCacheScheduled(false)
121 { 121 {
122 if (document.settings() && document.settings()->antialiasedClips2dCanvasEnab led()) 122 if (document.settings() && !document.settings()->antialiasedClips2dCanvasDis abled())
123 m_clipAntialiasing = AntiAliased; 123 m_clipAntialiasing = AntiAliased;
124 setShouldAntialias(true); 124 setShouldAntialias(true);
125 ThreadState::current()->registerPreFinalizer(this); 125 ThreadState::current()->registerPreFinalizer(this);
126 } 126 }
127 127
128 void CanvasRenderingContext2D::setCanvasGetContextResult(RenderingContext& resul t) 128 void CanvasRenderingContext2D::setCanvasGetContextResult(RenderingContext& resul t)
129 { 129 {
130 result.setCanvasRenderingContext2D(this); 130 result.setCanvasRenderingContext2D(this);
131 } 131 }
132 132
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 return true; 1081 return true;
1082 } 1082 }
1083 1083
1084 void CanvasRenderingContext2D::resetUsageTracking() 1084 void CanvasRenderingContext2D::resetUsageTracking()
1085 { 1085 {
1086 UsageCounters newCounters; 1086 UsageCounters newCounters;
1087 m_usageCounters = newCounters; 1087 m_usageCounters = newCounters;
1088 } 1088 }
1089 1089
1090 } // namespace blink 1090 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698