diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2012-05-11 12:44:50 -0700 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2012-05-11 12:59:44 -0700 |
commit | 8391ddb06a5b36834e8bafb36763d792c1602ace (patch) | |
tree | 3424d3f42f956caac1514ed41c9b752484d8c67f /Source | |
parent | e35dd347e6dd4854f19a7700488e8d35f3ad1135 (diff) | |
download | external_webkit-8391ddb06a5b36834e8bafb36763d792c1602ace.zip external_webkit-8391ddb06a5b36834e8bafb36763d792c1602ace.tar.gz external_webkit-8391ddb06a5b36834e8bafb36763d792c1602ace.tar.bz2 |
Don't draw when clip is zero.
In full screen mode, framework still need to call drawGL for now.
But we can early return in this case.
bug:6477718
Change-Id: I02194f5739d6ae055b1cf14fbf9479b7bb8ebe52
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WebKit/android/nav/WebView.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp index a78392b..59901ff 100644 --- a/Source/WebKit/android/nav/WebView.cpp +++ b/Source/WebKit/android/nav/WebView.cpp @@ -698,11 +698,6 @@ class GLDrawFunctor : Functor { if (shouldDraw) wvInstance->updateRectsForGL(); - if (invScreenRect.isEmpty()) { - // NOOP operation if viewport is empty - return 0; - } - WebCore::IntRect inval; int titlebarHeight = screenRect.height() - invScreenRect.height(); @@ -711,6 +706,11 @@ class GLDrawFunctor : Functor { info->clipRight - info->clipLeft, info->clipBottom - info->clipTop); + if (invScreenRect.isEmpty() || screenClip.isEmpty()) { + // NOOP operation if screenRect or clip is empty + return 0; + } + WebCore::IntRect localInvScreenRect = invScreenRect; if (info->isLayer) { // When webview is on a layer, we need to use the viewport relative |