Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv ed. | 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv ed. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 | 28 |
| 29 #include "bindings/core/v8/ScriptWrappable.h" | 29 #include "bindings/core/v8/ScriptWrappable.h" |
| 30 #include "core/html/canvas/CanvasContextCreationAttributes.h" | 30 #include "core/html/canvas/CanvasContextCreationAttributes.h" |
| 31 #include "core/html/canvas/CanvasRenderingContext.h" | 31 #include "core/html/canvas/CanvasRenderingContext.h" |
| 32 #include "core/html/canvas/CanvasRenderingContextFactory.h" | 32 #include "core/html/canvas/CanvasRenderingContextFactory.h" |
| 33 #include "core/svg/SVGResourceClient.h" | 33 #include "core/svg/SVGResourceClient.h" |
| 34 #include "modules/ModulesExport.h" | 34 #include "modules/ModulesExport.h" |
| 35 #include "modules/canvas2d/BaseRenderingContext2D.h" | 35 #include "modules/canvas2d/BaseRenderingContext2D.h" |
| 36 #include "modules/canvas2d/Canvas2DContextAttributes.h" | 36 #include "modules/canvas2d/Canvas2DContextAttributes.h" |
| 37 #include "modules/canvas2d/CanvasRenderingContext2DState.h" | 37 #include "modules/canvas2d/CanvasRenderingContext2DState.h" |
| 38 #include "platform/graphics/ExpensiveCanvasHeuristicParameters.h" | |
| 38 #include "platform/graphics/GraphicsTypes.h" | 39 #include "platform/graphics/GraphicsTypes.h" |
| 39 #include "platform/heap/GarbageCollected.h" | 40 #include "platform/heap/GarbageCollected.h" |
| 40 #include "public/platform/WebThread.h" | 41 #include "public/platform/WebThread.h" |
| 41 #include "wtf/Vector.h" | 42 #include "wtf/Vector.h" |
| 42 #include "wtf/text/WTFString.h" | 43 #include "wtf/text/WTFString.h" |
| 43 | 44 |
| 44 namespace blink { class WebLayer; } | 45 namespace blink { class WebLayer; } |
| 45 | 46 |
| 46 namespace blink { | 47 namespace blink { |
| 47 | 48 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 LostContextMode m_contextLostMode; | 218 LostContextMode m_contextLostMode; |
| 218 bool m_contextRestorable; | 219 bool m_contextRestorable; |
| 219 unsigned m_tryRestoreContextAttemptCount; | 220 unsigned m_tryRestoreContextAttemptCount; |
| 220 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; | 221 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; |
| 221 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; | 222 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; |
| 222 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; | 223 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; |
| 223 | 224 |
| 224 HashMap<String, Font> m_fontsResolvedUsingCurrentStyle; | 225 HashMap<String, Font> m_fontsResolvedUsingCurrentStyle; |
| 225 bool m_pruneLocalFontCacheScheduled; | 226 bool m_pruneLocalFontCacheScheduled; |
| 226 ListHashSet<String> m_fontLRUList; | 227 ListHashSet<String> m_fontLRUList; |
| 228 | |
| 229 double estimateRenderingCostForUsage(BaseRenderingContext2D::UsageCounters, ExpensiveCanvasHeuristicParameters::RenderingModeCostIndex) const; | |
|
Justin Novosad
2016/08/04 15:53:17
Why does UsageCounters need to be an argument? get
sebastienlc
2016/08/04 16:36:27
Done.
| |
| 227 }; | 230 }; |
| 228 | 231 |
| 229 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d()); | 232 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d()); |
| 230 | 233 |
| 231 } // namespace blink | 234 } // namespace blink |
| 232 | 235 |
| 233 #endif // CanvasRenderingContext2D_h | 236 #endif // CanvasRenderingContext2D_h |
| OLD | NEW |