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

Side by Side Diff: Source/core/html/canvas/CanvasRenderingContext.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: add a layout test 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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void ref() { m_canvas->ref(); } 51 void ref() { m_canvas->ref(); }
52 void deref() { m_canvas->deref(); } 52 void deref() { m_canvas->deref(); }
53 #endif 53 #endif
54 54
55 HTMLCanvasElement* canvas() const { return m_canvas; } 55 HTMLCanvasElement* canvas() const { return m_canvas; }
56 56
57 virtual bool is2d() const { return false; } 57 virtual bool is2d() const { return false; }
58 virtual bool is3d() const { return false; } 58 virtual bool is3d() const { return false; }
59 virtual bool isAccelerated() const { return false; } 59 virtual bool isAccelerated() const { return false; }
60 virtual bool hasAlpha() const { return true; } 60 virtual bool hasAlpha() const { return true; }
61 virtual void setIsHidden(bool) = 0;
61 62
62 virtual void paintRenderingResultsToCanvas() {} 63 virtual void paintRenderingResultsToCanvas() {}
63 64
64 virtual blink::WebLayer* platformLayer() const { return 0; } 65 virtual blink::WebLayer* platformLayer() const { return 0; }
65 66
66 virtual void trace(Visitor* visitor) { visitor->trace(m_canvas); } 67 virtual void trace(Visitor* visitor) { visitor->trace(m_canvas); }
67 68
68 bool wouldTaintOrigin(CanvasImageSource*); 69 bool wouldTaintOrigin(CanvasImageSource*);
69 70
70 protected: 71 protected:
71 CanvasRenderingContext(HTMLCanvasElement*); 72 CanvasRenderingContext(HTMLCanvasElement*);
72 73
73 private: 74 private:
74 RawPtrWillBeMember<HTMLCanvasElement> m_canvas; 75 RawPtrWillBeMember<HTMLCanvasElement> m_canvas;
75 HashSet<String> m_cleanURLs; 76 HashSet<String> m_cleanURLs;
76 HashSet<String> m_dirtyURLs; 77 HashSet<String> m_dirtyURLs;
77 }; 78 };
78 79
79 } // namespace WebCore 80 } // namespace WebCore
80 81
81 #endif 82 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698