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

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

Issue 251023004: WebGL: Free temporary GPU resources held by inactive or hidden WebGL. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use ASSERT instead of 'if' in prepareMailbox() Created 6 years, 5 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 void drawFocusRing(const Path&); 344 void drawFocusRing(const Path&);
345 345
346 void addHitRegionInternal(const HitRegionOptions&, ExceptionState&); 346 void addHitRegionInternal(const HitRegionOptions&, ExceptionState&);
347 bool hasClip() { return state().m_hasClip; } 347 bool hasClip() { return state().m_hasClip; }
348 348
349 void validateStateStack(); 349 void validateStateStack();
350 350
351 virtual bool is2d() const OVERRIDE { return true; } 351 virtual bool is2d() const OVERRIDE { return true; }
352 virtual bool isAccelerated() const OVERRIDE; 352 virtual bool isAccelerated() const OVERRIDE;
353 virtual bool hasAlpha() const OVERRIDE { return m_hasAlpha; } 353 virtual bool hasAlpha() const OVERRIDE { return m_hasAlpha; }
354 virtual void setIsHidden(bool) OVERRIDE;
354 355
355 virtual bool isTransformInvertible() const OVERRIDE { return state().m_inver tibleCTM; } 356 virtual bool isTransformInvertible() const OVERRIDE { return state().m_inver tibleCTM; }
356 357
357 virtual blink::WebLayer* platformLayer() const OVERRIDE; 358 virtual blink::WebLayer* platformLayer() const OVERRIDE;
358 359
359 WillBeHeapVector<OwnPtrWillBeMember<State> > m_stateStack; 360 WillBeHeapVector<OwnPtrWillBeMember<State> > m_stateStack;
360 OwnPtrWillBeMember<HitRegionManager> m_hitRegionManager; 361 OwnPtrWillBeMember<HitRegionManager> m_hitRegionManager;
361 bool m_usesCSSCompatibilityParseMode; 362 bool m_usesCSSCompatibilityParseMode;
362 bool m_hasAlpha; 363 bool m_hasAlpha;
363 bool m_isContextLost; 364 bool m_isContextLost;
364 bool m_contextRestorable; 365 bool m_contextRestorable;
365 Canvas2DContextStorage m_storageMode; 366 Canvas2DContextStorage m_storageMode;
366 MutableStylePropertyMap m_fetchedFonts; 367 MutableStylePropertyMap m_fetchedFonts;
367 unsigned m_tryRestoreContextAttemptCount; 368 unsigned m_tryRestoreContextAttemptCount;
368 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; 369 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer;
369 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; 370 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer;
370 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; 371 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer;
371 }; 372 };
372 373
373 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d()); 374 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d());
374 375
375 } // namespace WebCore 376 } // namespace WebCore
376 377
377 #endif 378 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698