Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

webkit:Reduce processing in WebCore thread while scrolling and zooming

Change-Id: I7554209dafcc7ded71b36fa3773b528d3ab2f9cf
  • Loading branch information...
commit 672f04fa8bf33536698804d392c05c354fccdc16 1 parent 1fbc74f
Shyama Prasad Mondal authored cyanogen committed
View
3  Source/WebCore/platform/graphics/android/TexturesGenerator.cpp
@@ -27,7 +27,7 @@
#include "TexturesGenerator.h"
#if USE(ACCELERATED_COMPOSITING)
-
+#include "sys/types.h"
#include "BaseLayerAndroid.h"
#include "GLUtils.h"
#include "PaintTileOperation.h"
@@ -162,6 +162,7 @@ QueuedOperation* TexturesGenerator::popNext()
bool TexturesGenerator::threadLoop()
{
+ m_threadID = gettid();
// Check if we have any pending operations.
mRequestedOperationsLock.lock();
while (!mRequestedOperations.size())
View
1  Source/WebCore/platform/graphics/android/TexturesGenerator.h
@@ -54,6 +54,7 @@ class TexturesGenerator : public Thread {
void removeOperationsForFilter(OperationFilter* filter, bool waitForRunning);
void scheduleOperation(QueuedOperation* operation);
+ int m_threadID;
private:
QueuedOperation* popNext();
View
5 Source/WebCore/platform/graphics/android/TilesManager.cpp
@@ -116,6 +116,11 @@ TilesManager::TilesManager()
m_pixmapsGenerationThread->run("TexturesGenerator");
}
+int TilesManager::getTextureManagerThreadID()
+{
+ return m_pixmapsGenerationThread->m_threadID;
+}
+
void TilesManager::allocateTiles()
{
int nbTexturesToAllocate = m_maxTextureCount - m_textures.size();
View
1  Source/WebCore/platform/graphics/android/TilesManager.h
@@ -198,6 +198,7 @@ class TilesManager {
{
return m_paintedSurfaces.size();
}
+ int getTextureManagerThreadID();
private:
TilesManager();
View
8 Source/WebKit/android/jni/WebViewCore.cpp
@@ -122,6 +122,7 @@
#include "autofill/WebAutofill.h"
#include "htmlediting.h"
#include "markup.h"
+#include "TilesManager.h"
#include <JNIHelp.h>
#include <JNIUtility.h>
@@ -4443,6 +4444,11 @@ static void SetNewStorageLimit(JNIEnv* env, jobject obj, jlong quota) {
#endif
}
+static jint GetTextureGeneratorThreadID(JNIEnv* env, jobject obj) {
+ return TilesManager::instance()->getTextureManagerThreadID();
+}
+
+
// Called from Java to provide a Geolocation permission state for the specified origin.
static void GeolocationPermissionsProvide(JNIEnv* env, jobject obj, jstring origin, jboolean allow, jboolean remember) {
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
@@ -4734,6 +4740,8 @@ static JNINativeMethod gJavaWebViewCoreMethods[] = {
(void*) DumpV8Counters },
{ "nativeSetNewStorageLimit", "(J)V",
(void*) SetNewStorageLimit },
+ { "nativeGetTextureGeneratorThreadID", "()I",
+ (void*) GetTextureGeneratorThreadID },
{ "nativeGeolocationPermissionsProvide", "(Ljava/lang/String;ZZ)V",
(void*) GeolocationPermissionsProvide },
{ "nativeSetIsPaused", "(Z)V", (void*) SetIsPaused },
Please sign in to comment.
Something went wrong with that request. Please try again.