From 334c36c686871998bf6c4ac958dfe3b3d5a87033 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Mon, 18 Jun 2012 17:45:00 -0700 Subject: Enable multiple tile painting threads Use one thread by default. Further experiments should be done with determining the correct number of threads, and better scheduling. Change-Id: I2a87dac7d0b652b5ab627744650d12b0b8842003 --- .../platform/graphics/android/rendering/TexturesGenerator.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Source/WebCore/platform/graphics/android/rendering/TexturesGenerator.h') diff --git a/Source/WebCore/platform/graphics/android/rendering/TexturesGenerator.h b/Source/WebCore/platform/graphics/android/rendering/TexturesGenerator.h index 290ad08..22ecf69 100644 --- a/Source/WebCore/platform/graphics/android/rendering/TexturesGenerator.h +++ b/Source/WebCore/platform/graphics/android/rendering/TexturesGenerator.h @@ -29,7 +29,7 @@ #if USE(ACCELERATED_COMPOSITING) #include "QueuedOperation.h" -#include "TilePainter.h" +#include "TransferQueue.h" #include #include @@ -43,10 +43,9 @@ class TilesManager; class TexturesGenerator : public Thread { public: - TexturesGenerator(TilesManager* instance) : Thread(false) - , m_tilesManager(instance) - , m_deferredMode(false) { } - virtual ~TexturesGenerator() { } + TexturesGenerator(TilesManager* instance); + virtual ~TexturesGenerator() {} + virtual status_t readyToRun(); bool tryUpdateOperationWithPainter(Tile* tile, TilePainter* painter); @@ -59,6 +58,7 @@ public: // signifying that they should be deferred static const int gDeferPriorityCutoff = 500000000; + SkBitmap* bitmap() { return &m_bitmap; } private: QueuedOperation* popNext(); virtual bool threadLoop(); @@ -68,6 +68,7 @@ private: android::Condition mRequestedOperationsCond; TilesManager* m_tilesManager; + SkBitmap m_bitmap; bool m_deferredMode; // defer painting for one second if best in queue has priority -- cgit v1.1