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

Side by Side Diff: Source/core/html/canvas/CanvasRenderingContext2D.h

Issue 658603002: 2D canvas: fix shadow rendering with compositing modes that require temp layers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comment fix Created 6 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 | Annotate | Revision Log
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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 bool m_hasClip; 297 bool m_hasClip;
298 }; 298 };
299 299
300 CanvasRenderingContext2D(HTMLCanvasElement*, const Canvas2DContextAttributes * attrs, bool usesCSSCompatibilityParseMode); 300 CanvasRenderingContext2D(HTMLCanvasElement*, const Canvas2DContextAttributes * attrs, bool usesCSSCompatibilityParseMode);
301 301
302 State& modifiableState() { ASSERT(!state().m_unrealizedSaveCount); return *m _stateStack.last(); } 302 State& modifiableState() { ASSERT(!state().m_unrealizedSaveCount); return *m _stateStack.last(); }
303 const State& state() const { return *m_stateStack.last(); } 303 const State& state() const { return *m_stateStack.last(); }
304 304
305 void applyLineDash() const; 305 void applyLineDash() const;
306 void setShadow(const FloatSize& offset, float blur, RGBA32 color); 306 void setShadow(const FloatSize& offset, float blur, RGBA32 color);
307 void applyShadow(); 307 void applyShadow(ShadowMode = DrawShadowAndForeground);
308 bool shouldDrawShadows() const; 308 bool shouldDrawShadows() const;
309 309
310 void dispatchContextLostEvent(Timer<CanvasRenderingContext2D>*); 310 void dispatchContextLostEvent(Timer<CanvasRenderingContext2D>*);
311 void dispatchContextRestoredEvent(Timer<CanvasRenderingContext2D>*); 311 void dispatchContextRestoredEvent(Timer<CanvasRenderingContext2D>*);
312 void tryRestoreContextEvent(Timer<CanvasRenderingContext2D>*); 312 void tryRestoreContextEvent(Timer<CanvasRenderingContext2D>*);
313 313
314 bool computeDirtyRect(const FloatRect& localBounds, FloatRect*); 314 bool computeDirtyRect(const FloatRect& localBounds, FloatRect*);
315 bool computeDirtyRect(const FloatRect& localBounds, const FloatRect& transfo rmedClipBounds, FloatRect*); 315 bool computeDirtyRect(const FloatRect& localBounds, const FloatRect& transfo rmedClipBounds, FloatRect*);
316 void didDraw(const FloatRect&); 316 void didDraw(const FloatRect&);
317 317
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; 379 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer;
380 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; 380 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer;
381 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; 381 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer;
382 }; 382 };
383 383
384 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d()); 384 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d());
385 385
386 } // namespace blink 386 } // namespace blink
387 387
388 #endif // CanvasRenderingContext2D_h 388 #endif // CanvasRenderingContext2D_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/canvas/canvas-shadow-source-in-expected.html ('k') | Source/core/html/canvas/CanvasRenderingContext2D.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698