Merge changes I282a8421,I53d15f37 into honeycomb
* changes:
Merging Gingerbread assets into Honeycomb
Removing old assets from SystemUI in drawable-hdpi
diff --git a/include/utils/Functor.h b/include/utils/Functor.h
new file mode 100644
index 0000000..3955bc3
--- /dev/null
+++ b/include/utils/Functor.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_FUNCTOR_H
+#define ANDROID_FUNCTOR_H
+
+#include <utils/Errors.h>
+
+namespace android {
+
+class Functor {
+public:
+ Functor() {}
+ virtual ~Functor() {}
+ virtual status_t operator ()() { return true; }
+};
+
+}; // namespace android
+
+#endif // ANDROID_FUNCTOR_H
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 694af70..291ebc5 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2170,8 +2170,6 @@
GLenum status = glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES);
- LOGD("screenshot: FBO created, status=0x%x", status);
-
if (status == GL_FRAMEBUFFER_COMPLETE_OES) {
// invert everything, b/c glReadPixel() below will invert the FB
@@ -2187,8 +2185,6 @@
glClearColor(0,0,0,1);
glClear(GL_COLOR_BUFFER_BIT);
- LOGD("screenshot: glClear() issued");
-
const Vector< sp<LayerBase> >& layers(mVisibleLayersSortedByZ);
const size_t count = layers.size();
for (size_t i=0 ; i<count ; ++i) {
@@ -2199,8 +2195,6 @@
}
}
- LOGD("screenshot: All layers rendered");
-
// XXX: this is needed on tegra
glScissor(0, 0, sw, sh);
@@ -2215,10 +2209,6 @@
new MemoryHeapBase(size, 0, "screen-capture") );
void* const ptr = base->getBase();
if (ptr) {
-
- LOGD("screenshot: about to call glReadPixels(0,0,%d,%d,...,%p)",
- sw, sh, ptr);
-
// capture the screen with glReadPixels()
glReadPixels(0, 0, sw, sh, GL_RGBA, GL_UNSIGNED_BYTE, ptr);
if (glGetError() == GL_NO_ERROR) {
@@ -2231,9 +2221,6 @@
} else {
result = NO_MEMORY;
}
-
- LOGD("screenshot: glReadPixels() returned %s", strerror(result));
-
}
glEnable(GL_SCISSOR_TEST);
glViewport(0, 0, hw_w, hw_h);
@@ -2244,18 +2231,14 @@
result = BAD_VALUE;
}
- LOGD("screenshot: about to release FBO resources");
-
// release FBO resources
glBindFramebufferOES(GL_FRAMEBUFFER_OES, 0);
glDeleteRenderbuffersOES(1, &tname);
glDeleteFramebuffersOES(1, &name);
- LOGD("screenshot: about to call compositionComplete()");
-
hw.compositionComplete();
- LOGD("screenshot: result = %s", strerror(result));
+ LOGD("screenshot: result = %s", result<0 ? strerror(result) : "OK");
return result;
}