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

Unified Diff: sky/engine/platform/graphics/Canvas2DLayerManager.h

Issue 673783005: Canvas2DLayerManager shouldn't use a task observer (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/engine/platform/graphics/Canvas2DLayerManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/platform/graphics/Canvas2DLayerManager.h
diff --git a/sky/engine/platform/graphics/Canvas2DLayerManager.h b/sky/engine/platform/graphics/Canvas2DLayerManager.h
index 1f1c8595435e5bed98c673ff0a259b20e19a6b48..b4f40dac6311516a657e5ddd84b4befe0416e6a4 100644
--- a/sky/engine/platform/graphics/Canvas2DLayerManager.h
+++ b/sky/engine/platform/graphics/Canvas2DLayerManager.h
@@ -25,14 +25,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef Canvas2DLayerManager_h
#define Canvas2DLayerManager_h
+#include "platform/Timer.h"
#include "platform/graphics/Canvas2DLayerBridge.h"
-#include "public/platform/WebThread.h"
class Canvas2DLayerManagerTest;
namespace blink {
-class PLATFORM_EXPORT Canvas2DLayerManager : public WebThread::TaskObserver {
+class PLATFORM_EXPORT Canvas2DLayerManager {
public:
static Canvas2DLayerManager& get();
@@ -49,13 +49,13 @@ private:
// internal methods
void freeMemoryIfNecessary();
void addLayerToList(Canvas2DLayerBridge*);
- virtual void willProcessTask() OVERRIDE;
- virtual void didProcessTask() OVERRIDE;
+
+ void limitPendingFramesTimerFired(Timer<Canvas2DLayerManager>*);
size_t m_bytesAllocated;
size_t m_maxBytesAllocated;
size_t m_targetBytesAllocated;
- bool m_taskObserverActive;
+ Timer<Canvas2DLayerManager> m_limitPendingFramesTimer;
DoublyLinkedList<Canvas2DLayerBridge> m_layerList;
friend class ::Canvas2DLayerManagerTest; // for unit testing
« no previous file with comments | « no previous file | sky/engine/platform/graphics/Canvas2DLayerManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698