diff options
author | Russell Brenner <russellbrenner@google.com> | 2011-02-07 13:30:38 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-02-07 13:30:38 -0800 |
commit | 4a181ab990b9a9d3e84ef21bea182c21b0c32414 (patch) | |
tree | 7d5b3148bbc19258607bcbf866d589cc39292807 /WebCore/platform | |
parent | 79f07c999ff47d31cb788a64e35bfc04e7ed394d (diff) | |
parent | 9be6b70c70a7d14a0c720801f9aeb631a00bbc0e (diff) | |
download | external_webkit-4a181ab990b9a9d3e84ef21bea182c21b0c32414.zip external_webkit-4a181ab990b9a9d3e84ef21bea182c21b0c32414.tar.gz external_webkit-4a181ab990b9a9d3e84ef21bea182c21b0c32414.tar.bz2 |
Merge "Fix 3366514 (again): browser emulator crash" into honeycomb
Diffstat (limited to 'WebCore/platform')
-rw-r--r-- | WebCore/platform/graphics/android/BaseLayerAndroid.cpp | 9 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/TilesManager.h | 5 |
2 files changed, 8 insertions, 6 deletions
diff --git a/WebCore/platform/graphics/android/BaseLayerAndroid.cpp b/WebCore/platform/graphics/android/BaseLayerAndroid.cpp index b632664..2f0e999 100644 --- a/WebCore/platform/graphics/android/BaseLayerAndroid.cpp +++ b/WebCore/platform/graphics/android/BaseLayerAndroid.cpp @@ -36,10 +36,6 @@ #include <wtf/CurrentTime.h> #endif // USE(ACCELERATED_COMPOSITING) -// #if TARGET_DEVICE != generic /* Not supported in emulator */ -#define HARDWARE_ACCELERATION -// #endif - #ifdef DEBUG #include <cutils/log.h> @@ -72,8 +68,9 @@ BaseLayerAndroid::BaseLayerAndroid() BaseLayerAndroid::~BaseLayerAndroid() { -#ifdef HARDWARE_ACCELERATION - TilesManager::instance()->removeOperationsForBaseLayer(this); +#if USE(ACCELERATED_COMPOSITING) + if (TilesManager::hardwareAccelerationEnabled()) + TilesManager::instance()->removeOperationsForBaseLayer(this); #endif m_content.clear(); #ifdef DEBUG_COUNT diff --git a/WebCore/platform/graphics/android/TilesManager.h b/WebCore/platform/graphics/android/TilesManager.h index 04147b0..eeb38fe 100644 --- a/WebCore/platform/graphics/android/TilesManager.h +++ b/WebCore/platform/graphics/android/TilesManager.h @@ -46,6 +46,11 @@ public: static TilesManager* instance(); static GLint getMaxTextureSize(); + static bool hardwareAccelerationEnabled() + { + return gInstance != 0; + } + void removeOperationsForPage(TiledPage* page) { m_pixmapsGenerationThread->removeOperationsForPage(page); |