Merge "Cleanup of libhwui" into jb-mr1-dev
This commit is contained in:
@@ -82,17 +82,11 @@ class GLES20RenderLayer extends GLES20Layer {
|
||||
}
|
||||
|
||||
@Override
|
||||
void end(Canvas currentCanvas) {
|
||||
if (currentCanvas instanceof GLES20Canvas) {
|
||||
((GLES20Canvas) currentCanvas).resume();
|
||||
}
|
||||
void end() {
|
||||
}
|
||||
|
||||
@Override
|
||||
HardwareCanvas start(Canvas currentCanvas) {
|
||||
if (currentCanvas instanceof GLES20Canvas) {
|
||||
((GLES20Canvas) currentCanvas).interrupt();
|
||||
}
|
||||
HardwareCanvas start() {
|
||||
return getCanvas();
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package android.view;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.SurfaceTexture;
|
||||
@@ -57,12 +56,12 @@ class GLES20TextureLayer extends GLES20Layer {
|
||||
}
|
||||
|
||||
@Override
|
||||
HardwareCanvas start(Canvas currentCanvas) {
|
||||
HardwareCanvas start() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
void end(Canvas currentCanvas) {
|
||||
void end() {
|
||||
}
|
||||
|
||||
SurfaceTexture getSurfaceTexture() {
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package android.view;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.Rect;
|
||||
|
||||
@@ -144,15 +143,13 @@ abstract class HardwareLayer {
|
||||
|
||||
/**
|
||||
* This must be invoked before drawing onto this layer.
|
||||
* @param currentCanvas
|
||||
*/
|
||||
abstract HardwareCanvas start(Canvas currentCanvas);
|
||||
abstract HardwareCanvas start();
|
||||
|
||||
/**
|
||||
* This must be invoked after drawing onto this layer.
|
||||
* @param currentCanvas
|
||||
*/
|
||||
abstract void end(Canvas currentCanvas);
|
||||
abstract void end();
|
||||
|
||||
/**
|
||||
* Copies this layer into the specified bitmap.
|
||||
|
||||
@@ -1408,7 +1408,6 @@ public final class ViewRootImpl implements ViewParent,
|
||||
disposeResizeBuffer();
|
||||
|
||||
boolean completed = false;
|
||||
HardwareCanvas hwRendererCanvas = mAttachInfo.mHardwareRenderer.getCanvas();
|
||||
HardwareCanvas layerCanvas = null;
|
||||
try {
|
||||
if (mResizeBuffer == null) {
|
||||
@@ -1418,7 +1417,7 @@ public final class ViewRootImpl implements ViewParent,
|
||||
mResizeBuffer.getHeight() != mHeight) {
|
||||
mResizeBuffer.resize(mWidth, mHeight);
|
||||
}
|
||||
layerCanvas = mResizeBuffer.start(hwRendererCanvas);
|
||||
layerCanvas = mResizeBuffer.start();
|
||||
layerCanvas.setViewport(mWidth, mHeight);
|
||||
layerCanvas.onPreDraw(null);
|
||||
final int restoreCount = layerCanvas.save();
|
||||
@@ -1457,7 +1456,7 @@ public final class ViewRootImpl implements ViewParent,
|
||||
layerCanvas.onPostDraw();
|
||||
}
|
||||
if (mResizeBuffer != null) {
|
||||
mResizeBuffer.end(hwRendererCanvas);
|
||||
mResizeBuffer.end();
|
||||
if (!completed) {
|
||||
mResizeBuffer.destroy();
|
||||
mResizeBuffer = null;
|
||||
|
||||
Reference in New Issue
Block a user