summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics
diff options
context:
space:
mode:
authorRussell Brenner <russellbrenner@google.com>2011-02-07 13:52:14 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-02-07 13:52:14 -0800
commitd02d2e3253ac66eccbf189774129cb56f715638b (patch)
tree86c121628d23d47a1390e95ef6ce20e45bc463e5 /WebCore/platform/graphics
parent1d9f4181afce8563f351e3ed505e5ccf415e4176 (diff)
parentb50b0e165c9c308b9a4a1824db6ef52a00acadf5 (diff)
downloadexternal_webkit-d02d2e3253ac66eccbf189774129cb56f715638b.zip
external_webkit-d02d2e3253ac66eccbf189774129cb56f715638b.tar.gz
external_webkit-d02d2e3253ac66eccbf189774129cb56f715638b.tar.bz2
am b50b0e16: am 4a181ab9: Merge "Fix 3366514 (again): browser emulator crash" into honeycomb
* commit 'b50b0e165c9c308b9a4a1824db6ef52a00acadf5': Fix 3366514 (again): browser emulator crash
Diffstat (limited to 'WebCore/platform/graphics')
-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);