summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2012-05-18 09:43:52 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-05-18 09:43:52 -0700
commit17a19ec12d412e1fc4b899e2aea97852bdd00e9a (patch)
tree53714bf6a14f2b12de397949ff184992206816bd
parent1e59a334a1203c7be3fff2f9dbf94fee5b879d20 (diff)
parent3e476ce1b6f3ba7f4ba23f2cd359a104fdf6a734 (diff)
downloadexternal_webkit-17a19ec12d412e1fc4b899e2aea97852bdd00e9a.zip
external_webkit-17a19ec12d412e1fc4b899e2aea97852bdd00e9a.tar.gz
external_webkit-17a19ec12d412e1fc4b899e2aea97852bdd00e9a.tar.bz2
Merge "Clean up some redundant code" into jb-dev
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp6
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h2
2 files changed, 2 insertions, 6 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp
index 77b238e..0e5c3ba 100644
--- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp
@@ -164,16 +164,12 @@ bool SurfaceCollection::isReady()
bool SurfaceCollection::isBaseSurfaceReady()
{
- if (!m_compositedRoot || !m_surfaces[0])
- return false;
+ // m_surfaces[0] should be the base surface when in single surface mode.
return m_surfaces[0]->isReady();
}
bool SurfaceCollection::isMissingBackgroundContent()
{
- if (!m_compositedRoot)
- return true;
-
// return true when the first surface is missing content (indicating the
// entire viewport isn't covered)
return m_surfaces[0]->isMissingContent();
diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h
index 5eb5d65..7088bec 100644
--- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h
+++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h
@@ -73,7 +73,7 @@ public:
private:
void updateLayerPositions(const SkRect& visibleContentRect);
- BaseLayerAndroid* m_compositedRoot;
+ BaseLayerAndroid* const m_compositedRoot;
WTF::Vector<Surface*> m_surfaces;
};