diff options
author | Chris Craik <ccraik@google.com> | 2012-08-24 16:58:29 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2012-08-24 16:58:29 -0700 |
commit | ae7d73128baa76b45c16886913891a8a3c0baee3 (patch) | |
tree | 541759389cdf61f0c817208c919767338d0bd1ea /Source | |
parent | 19756ca1956aa2f3a4c7ef5095cb95a3010338ac (diff) | |
download | external_webkit-ae7d73128baa76b45c16886913891a8a3c0baee3.zip external_webkit-ae7d73128baa76b45c16886913891a8a3c0baee3.tar.gz external_webkit-ae7d73128baa76b45c16886913891a8a3c0baee3.tar.bz2 |
Don't track the opaque area of small drawing operations
Avoids region & matrix computation work for small ops. Area value of 750
determined empirically.
Change-Id: Iffc041ff69cd47c152ae4f71a474f4f6ccdc0bc5
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp index 15214ad..3237a80 100644 --- a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp +++ b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp @@ -47,6 +47,7 @@ #define NEW_OP(X) new (heap()) GraphicsOperation::X #define USE_CLIPPING_PAINTER true +#define MIN_TRACKED_OPAQUE_AREA 750 namespace WebCore { @@ -1044,7 +1045,9 @@ void PlatformGraphicsContextRecording::appendDrawingOperation( return; } #if USE_CLIPPING_PAINTER - if (operation->isOpaque() && !untranslatedBounds.isEmpty()) { + if (operation->isOpaque() + && !untranslatedBounds.isEmpty() + && (untranslatedBounds.width() * untranslatedBounds.height() > MIN_TRACKED_OPAQUE_AREA)) { // if the operation maps to an opaque rect, record the area it will cover operation->setOpaqueRect(calculateCoveredBounds(untranslatedBounds)); } |