summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/rendering/TexturesGenerator.h
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-06-18 17:45:00 -0700
committerChris Craik <ccraik@google.com>2012-06-19 11:57:49 -0700
commit334c36c686871998bf6c4ac958dfe3b3d5a87033 (patch)
tree90a5710f6c42770076025344490844b3794a60fd /Source/WebCore/platform/graphics/android/rendering/TexturesGenerator.h
parent0634b6f6429e4e30beddf85239da061726861484 (diff)
downloadexternal_webkit-334c36c686871998bf6c4ac958dfe3b3d5a87033.zip
external_webkit-334c36c686871998bf6c4ac958dfe3b3d5a87033.tar.gz
external_webkit-334c36c686871998bf6c4ac958dfe3b3d5a87033.tar.bz2
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
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering/TexturesGenerator.h')
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/TexturesGenerator.h11
1 files changed, 6 insertions, 5 deletions
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 <wtf/HashMap.h>
#include <wtf/Vector.h>
@@ -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