Reduce the size of dirty invalidates
Remove remnants from times long gone. We don't need to redraw the
union of the previous frame's dirty region and the new dirty
region.
Change-Id: I9fb96f99a6a72c2233f9ca563cf6432a42b2b65b
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java
index 7918823..8055077 100644
--- a/core/java/android/view/HardwareRenderer.java
+++ b/core/java/android/view/HardwareRenderer.java
@@ -451,10 +451,8 @@
* @param attachInfo AttachInfo tied to the specified view.
* @param callbacks Callbacks invoked when drawing happens.
* @param dirty The dirty rectangle to update, can be null.
- *
- * @return true if the dirty rect was ignored, false otherwise
*/
- abstract boolean draw(View view, View.AttachInfo attachInfo, HardwareDrawCallbacks callbacks,
+ abstract void draw(View view, View.AttachInfo attachInfo, HardwareDrawCallbacks callbacks,
Rect dirty);
/**
@@ -992,11 +990,7 @@
mCanvas = createCanvas();
mCanvas.setName(mName);
}
- if (mCanvas != null) {
- setEnabled(true);
- } else {
- Log.w(LOG_TAG, "Hardware accelerated Canvas could not be created");
- }
+ setEnabled(true);
}
return mCanvas != null;
@@ -1340,7 +1334,7 @@
}
@Override
- boolean draw(View view, View.AttachInfo attachInfo, HardwareDrawCallbacks callbacks,
+ void draw(View view, View.AttachInfo attachInfo, HardwareDrawCallbacks callbacks,
Rect dirty) {
if (canDraw()) {
if (!hasDirtyRegions()) {
@@ -1401,11 +1395,8 @@
}
attachInfo.mIgnoreDirtyState = false;
- return dirty == null;
}
}
-
- return false;
}
private DisplayList buildDisplayList(View view, HardwareCanvas canvas) {