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

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

Issue 2649783002: Move CanvasRenderingContext2D timer to frame-specific TaskRunnerTimer. (Closed)
Patch Set: Move CanvasRenderingContext2D timer to frame-specific TaskRunnerTimer. Created 3 years, 10 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 | « third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h ('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 (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 23 matching lines...) Expand all
34 #include "modules/canvas2d/CanvasRenderingContext2D.h" 34 #include "modules/canvas2d/CanvasRenderingContext2D.h"
35 35
36 #include "bindings/core/v8/ExceptionMessages.h" 36 #include "bindings/core/v8/ExceptionMessages.h"
37 #include "bindings/core/v8/ExceptionState.h" 37 #include "bindings/core/v8/ExceptionState.h"
38 #include "bindings/modules/v8/RenderingContext.h" 38 #include "bindings/modules/v8/RenderingContext.h"
39 #include "core/CSSPropertyNames.h" 39 #include "core/CSSPropertyNames.h"
40 #include "core/css/StylePropertySet.h" 40 #include "core/css/StylePropertySet.h"
41 #include "core/css/resolver/StyleResolver.h" 41 #include "core/css/resolver/StyleResolver.h"
42 #include "core/dom/AXObjectCache.h" 42 #include "core/dom/AXObjectCache.h"
43 #include "core/dom/StyleEngine.h" 43 #include "core/dom/StyleEngine.h"
44 #include "core/dom/TaskRunnerHelper.h"
44 #include "core/events/Event.h" 45 #include "core/events/Event.h"
45 #include "core/events/MouseEvent.h" 46 #include "core/events/MouseEvent.h"
46 #include "core/frame/Settings.h" 47 #include "core/frame/Settings.h"
47 #include "core/html/TextMetrics.h" 48 #include "core/html/TextMetrics.h"
48 #include "core/html/canvas/CanvasFontCache.h" 49 #include "core/html/canvas/CanvasFontCache.h"
49 #include "core/layout/HitTestCanvasResult.h" 50 #include "core/layout/HitTestCanvasResult.h"
50 #include "core/layout/LayoutBox.h" 51 #include "core/layout/LayoutBox.h"
51 #include "core/layout/LayoutTheme.h" 52 #include "core/layout/LayoutTheme.h"
52 #include "modules/canvas2d/CanvasStyle.h" 53 #include "modules/canvas2d/CanvasStyle.h"
53 #include "modules/canvas2d/HitRegion.h" 54 #include "modules/canvas2d/HitRegion.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 112
112 CanvasRenderingContext2D::CanvasRenderingContext2D( 113 CanvasRenderingContext2D::CanvasRenderingContext2D(
113 HTMLCanvasElement* canvas, 114 HTMLCanvasElement* canvas,
114 const CanvasContextCreationAttributes& attrs, 115 const CanvasContextCreationAttributes& attrs,
115 Document& document) 116 Document& document)
116 : CanvasRenderingContext(canvas, nullptr, attrs), 117 : CanvasRenderingContext(canvas, nullptr, attrs),
117 m_contextLostMode(NotLostContext), 118 m_contextLostMode(NotLostContext),
118 m_contextRestorable(true), 119 m_contextRestorable(true),
119 m_tryRestoreContextAttemptCount(0), 120 m_tryRestoreContextAttemptCount(0),
120 m_dispatchContextLostEventTimer( 121 m_dispatchContextLostEventTimer(
122 TaskRunnerHelper::get(TaskType::MiscPlatformAPI,
123 canvas->document().frame()),
121 this, 124 this,
122 &CanvasRenderingContext2D::dispatchContextLostEvent), 125 &CanvasRenderingContext2D::dispatchContextLostEvent),
123 m_dispatchContextRestoredEventTimer( 126 m_dispatchContextRestoredEventTimer(
127 TaskRunnerHelper::get(TaskType::MiscPlatformAPI,
128 canvas->document().frame()),
124 this, 129 this,
125 &CanvasRenderingContext2D::dispatchContextRestoredEvent), 130 &CanvasRenderingContext2D::dispatchContextRestoredEvent),
126 m_tryRestoreContextEventTimer( 131 m_tryRestoreContextEventTimer(
132 TaskRunnerHelper::get(TaskType::MiscPlatformAPI,
133 canvas->document().frame()),
127 this, 134 this,
128 &CanvasRenderingContext2D::tryRestoreContextEvent), 135 &CanvasRenderingContext2D::tryRestoreContextEvent),
129 m_pruneLocalFontCacheScheduled(false) { 136 m_pruneLocalFontCacheScheduled(false) {
130 if (document.settings() && 137 if (document.settings() &&
131 document.settings()->getAntialiasedClips2dCanvasEnabled()) 138 document.settings()->getAntialiasedClips2dCanvasEnabled())
132 m_clipAntialiasing = AntiAliased; 139 m_clipAntialiasing = AntiAliased;
133 setShouldAntialias(true); 140 setShouldAntialias(true);
134 validateStateStack(); 141 validateStateStack();
135 } 142 }
136 143
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 } 1172 }
1166 return true; 1173 return true;
1167 } 1174 }
1168 1175
1169 void CanvasRenderingContext2D::resetUsageTracking() { 1176 void CanvasRenderingContext2D::resetUsageTracking() {
1170 UsageCounters newCounters; 1177 UsageCounters newCounters;
1171 m_usageCounters = newCounters; 1178 m_usageCounters = newCounters;
1172 } 1179 }
1173 1180
1174 } // namespace blink 1181 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698