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

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

Issue 2212163002: Add some plumbing for the color management of canvases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build and tests Created 4 years, 4 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) 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 int getFontBaseline(const FontMetrics&) const; 196 int getFontBaseline(const FontMetrics&) const;
197 197
198 void drawFocusIfNeededInternal(const Path&, Element*); 198 void drawFocusIfNeededInternal(const Path&, Element*);
199 bool focusRingCallIsValid(const Path&, Element*); 199 bool focusRingCallIsValid(const Path&, Element*);
200 void drawFocusRing(const Path&); 200 void drawFocusRing(const Path&);
201 void updateElementAccessibility(const Path&, Element*); 201 void updateElementAccessibility(const Path&, Element*);
202 202
203 CanvasRenderingContext::ContextType getContextType() const override { return CanvasRenderingContext::Context2d; } 203 CanvasRenderingContext::ContextType getContextType() const override { return CanvasRenderingContext::Context2d; }
204 bool is2d() const override { return true; } 204 bool is2d() const override { return true; }
205 bool isAccelerated() const override; 205 bool isAccelerated() const override;
206 bool hasAlpha() const override { return m_hasAlpha; } 206 bool hasAlpha() const override { return CanvasRenderingContext::hasAlpha(); }
207 void setIsHidden(bool) override; 207 void setIsHidden(bool) override;
208 void stop() final; 208 void stop() final;
209 DECLARE_VIRTUAL_TRACE(); 209 DECLARE_VIRTUAL_TRACE();
210 210
211 virtual bool isTransformInvertible() const; 211 virtual bool isTransformInvertible() const;
212 212
213 WebLayer* platformLayer() const override; 213 WebLayer* platformLayer() const override;
214 214
215 Member<HitRegionManager> m_hitRegionManager; 215 Member<HitRegionManager> m_hitRegionManager;
216 bool m_hasAlpha;
217 LostContextMode m_contextLostMode; 216 LostContextMode m_contextLostMode;
218 bool m_contextRestorable; 217 bool m_contextRestorable;
219 unsigned m_tryRestoreContextAttemptCount; 218 unsigned m_tryRestoreContextAttemptCount;
220 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; 219 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer;
221 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; 220 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer;
222 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; 221 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer;
223 222
224 HashMap<String, Font> m_fontsResolvedUsingCurrentStyle; 223 HashMap<String, Font> m_fontsResolvedUsingCurrentStyle;
225 bool m_pruneLocalFontCacheScheduled; 224 bool m_pruneLocalFontCacheScheduled;
226 ListHashSet<String> m_fontLRUList; 225 ListHashSet<String> m_fontLRUList;
227 }; 226 };
228 227
229 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d()); 228 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d());
230 229
231 } // namespace blink 230 } // namespace blink
232 231
233 #endif // CanvasRenderingContext2D_h 232 #endif // CanvasRenderingContext2D_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698