summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2012-05-18 15:59:30 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-05-18 15:59:30 -0700
commit035ccee8d36c4f500bd45d7af6c45e51826c9616 (patch)
tree53714bf6a14f2b12de397949ff184992206816bd
parentfd5698006bcb9182415182cc825a4b4949167d05 (diff)
parent17a19ec12d412e1fc4b899e2aea97852bdd00e9a (diff)
downloadexternal_webkit-035ccee8d36c4f500bd45d7af6c45e51826c9616.zip
external_webkit-035ccee8d36c4f500bd45d7af6c45e51826c9616.tar.gz
external_webkit-035ccee8d36c4f500bd45d7af6c45e51826c9616.tar.bz2
am 17a19ec1: Merge "Clean up some redundant code" into jb-dev
* commit '17a19ec12d412e1fc4b899e2aea97852bdd00e9a': Clean up some redundant code
-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;
};