summaryrefslogtreecommitdiffstats
path: root/WebCore/platform
diff options
context:
space:
mode:
authorRussell Brenner <russellbrenner@google.com>2011-02-07 13:30:38 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-02-07 13:30:38 -0800
commit4a181ab990b9a9d3e84ef21bea182c21b0c32414 (patch)
tree7d5b3148bbc19258607bcbf866d589cc39292807 /WebCore/platform
parent79f07c999ff47d31cb788a64e35bfc04e7ed394d (diff)
parent9be6b70c70a7d14a0c720801f9aeb631a00bbc0e (diff)
downloadexternal_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.cpp9
-rw-r--r--WebCore/platform/graphics/android/TilesManager.h5
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);