summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-04-10 14:24:30 -0700
committerMathias Agopian <mathias@google.com>2009-04-10 14:24:30 -0700
commit1473f46cbc82aa6f0ba744cc896a36923823d55b (patch)
tree1a03737c7eb71b32735693e5cfdd91d0b57a2ad5 /core
parent71d83c04897a10394009b02808bb6b86886b27e1 (diff)
downloadframeworks_base-1473f46cbc82aa6f0ba744cc896a36923823d55b.zip
frameworks_base-1473f46cbc82aa6f0ba744cc896a36923823d55b.tar.gz
frameworks_base-1473f46cbc82aa6f0ba744cc896a36923823d55b.tar.bz2
Integrate from //sandbox/mathias/donut/...@145728
SurfaceFlinger rework for new EGL driver model support.
Diffstat (limited to 'core')
-rw-r--r--core/jni/Android.mk2
-rw-r--r--core/jni/android_view_Surface.cpp25
-rw-r--r--core/jni/com_google_android_gles_jni_EGLImpl.cpp3
-rwxr-xr-x[-rw-r--r--]core/res/res/drawable/stat_sys_signal_flightmode.pngbin898 -> 898 bytes
4 files changed, 7 insertions, 23 deletions
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index 31b21e5..766febd 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -15,6 +15,8 @@ ifneq ($(USE_CUSTOM_RUNTIME_HEAP_MAX),)
LOCAL_CFLAGS += -DCUSTOM_RUNTIME_HEAP_MAX=$(USE_CUSTOM_RUNTIME_HEAP_MAX)
endif
+LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
+
LOCAL_SRC_FILES:= \
ActivityManager.cpp \
AndroidRuntime.cpp \
diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp
index 076775f..54d8b14 100644
--- a/core/jni/android_view_Surface.cpp
+++ b/core/jni/android_view_Surface.cpp
@@ -235,7 +235,8 @@ static jobject Surface_lockCanvas(JNIEnv* env, jobject clazz, jobject dirtyRect)
SkCanvas* nativeCanvas = (SkCanvas*)env->GetIntField(canvas, no.native_canvas);
SkBitmap bitmap;
- bitmap.setConfig(convertPixelFormat(info.format), info.w, info.h, info.bpr);
+ ssize_t bpr = info.s * bytesPerPixel(info.format);
+ bitmap.setConfig(convertPixelFormat(info.format), info.w, info.h, bpr);
if (info.w > 0 && info.h > 0) {
bitmap.setPixels(info.bits);
} else {
@@ -289,26 +290,8 @@ static void Surface_unlockCanvasAndPost(
static void Surface_unlockCanvas(
JNIEnv* env, jobject clazz, jobject argCanvas)
{
- jobject canvas = env->GetObjectField(clazz, so.canvas);
- if (canvas != argCanvas) {
- doThrow(env, "java/lang/IllegalArgumentException", NULL);
- return;
- }
-
- const sp<Surface>& surface = getSurface(env, clazz);
- if (!surface->isValid())
- return;
-
- status_t err = surface->unlock();
- if (err < 0) {
- doThrow(env, "java/lang/IllegalArgumentException", NULL);
- return;
- }
- SkCanvas* nativeCanvas = (SkCanvas*)env->GetIntField(canvas, no.native_canvas);
- int saveCount = env->GetIntField(clazz, so.saveCount);
- nativeCanvas->restoreToCount(saveCount);
- nativeCanvas->setBitmapDevice(SkBitmap());
- env->SetIntField(clazz, so.saveCount, 0);
+ // XXX: this API has been removed
+ doThrow(env, "java/lang/IllegalArgumentException", NULL);
}
static void Surface_openTransaction(
diff --git a/core/jni/com_google_android_gles_jni_EGLImpl.cpp b/core/jni/com_google_android_gles_jni_EGLImpl.cpp
index 4452065..974fc0b 100644
--- a/core/jni/com_google_android_gles_jni_EGLImpl.cpp
+++ b/core/jni/com_google_android_gles_jni_EGLImpl.cpp
@@ -21,7 +21,6 @@
#include <EGL/egl.h>
#include <GLES/gl.h>
-#include <ui/EGLNativeWindowSurface.h>
#include <ui/Surface.h>
#include <SkBitmap.h>
#include <SkPixelRef.h>
@@ -338,7 +337,7 @@ not_valid_surface:
goto not_valid_surface;
jint* base = beginNativeAttribList(_env, attrib_list);
- EGLSurface sur = eglCreateWindowSurface(dpy, cnf, new EGLNativeWindowSurface(window), base);
+ EGLSurface sur = eglCreateWindowSurface(dpy, cnf, window, base);
endNativeAttributeList(_env, attrib_list, base);
return (jint)sur;
}
diff --git a/core/res/res/drawable/stat_sys_signal_flightmode.png b/core/res/res/drawable/stat_sys_signal_flightmode.png
index 2f4fd4f..2f4fd4f 100644..100755
--- a/core/res/res/drawable/stat_sys_signal_flightmode.png
+++ b/core/res/res/drawable/stat_sys_signal_flightmode.png
Binary files differ