Fix the simulator build.

Change-Id: Ie404f7c2c308f0657f273af19a56e8c039b61898
diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk
index 9544fe69..a2fcc41 100644
--- a/libs/hwui/Android.mk
+++ b/libs/hwui/Android.mk
@@ -1,13 +1,27 @@
+# Does not build for the simulator
+ifneq ($(TARGET_SIMULATOR), true)
+
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES:= \
-	UIMatrix.cpp \
-	UIOpenGLRenderer.cpp
+	Matrix.cpp \
+	OpenGLRenderer.cpp
+
+LOCAL_C_INCLUDES += \
+	$(JNI_H_INCLUDE) \
+	$(LOCAL_PATH)/../../include/utils \
+	external/skia/include/core \
+	external/skia/include/effects \
+	external/skia/include/images \
+	external/skia/src/ports \
+	external/skia/include/utils
 
 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-LOCAL_SHARED_LIBRARIES := libcutils libutils libGLESv2
+LOCAL_SHARED_LIBRARIES := libcutils libutils libGLESv2 libskia
 LOCAL_MODULE:= libhwui
 LOCAL_PRELINK_MODULE := false
 
 include $(BUILD_SHARED_LIBRARY)
+
+endif #simulator
diff --git a/libs/hwui/UIMatrix.cpp b/libs/hwui/Matrix.cpp
similarity index 99%
rename from libs/hwui/UIMatrix.cpp
rename to libs/hwui/Matrix.cpp
index 954a525..b1eb701 100644
--- a/libs/hwui/UIMatrix.cpp
+++ b/libs/hwui/Matrix.cpp
@@ -21,7 +21,7 @@
 
 #include <utils/Log.h>
 
-#include "UIMatrix.h"
+#include "Matrix.h"
 
 namespace android {
 
diff --git a/libs/hwui/UIMatrix.h b/libs/hwui/Matrix.h
similarity index 96%
rename from libs/hwui/UIMatrix.h
rename to libs/hwui/Matrix.h
index 55d7c07..51014a9 100644
--- a/libs/hwui/UIMatrix.h
+++ b/libs/hwui/Matrix.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_UI_MATRIX_H
-#define ANDROID_UI_MATRIX_H
+#ifndef ANDROID_MATRIX_H
+#define ANDROID_MATRIX_H
 
 namespace android {
 
@@ -97,4 +97,4 @@
 
 }; // namespace android
 
-#endif // ANDROID_UI_MATRIX_H
+#endif // ANDROID_MATRIX_H
diff --git a/libs/hwui/UIOpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
similarity index 72%
rename from libs/hwui/UIOpenGLRenderer.cpp
rename to libs/hwui/OpenGLRenderer.cpp
index b6113da..35825d2 100644
--- a/libs/hwui/UIOpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "UIOpenGLRenderer"
+#define LOG_TAG "OpenGLRenderer"
 
 #include <stdlib.h>
 #include <stdint.h>
@@ -26,20 +26,22 @@
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
 
-#include "UIOpenGLRenderer.h"
-#include "UIMatrix.h"
+#include <SkXfermode.h>
+
+#include "OpenGLRenderer.h"
+#include "Matrix.h"
 
 namespace android {
 
-UIOpenGLRenderer::UIOpenGLRenderer() {
-    LOGD("Create UIOpenGLRenderer");
+OpenGLRenderer::OpenGLRenderer() {
+    LOGD("Create OpenGLRenderer");
 }
 
-UIOpenGLRenderer::~UIOpenGLRenderer() {
-    LOGD("Destroy UIOpenGLRenderer");
+OpenGLRenderer::~OpenGLRenderer() {
+    LOGD("Destroy OpenGLRenderer");
 }
 
-void UIOpenGLRenderer::setViewport(int width, int height) {
+void OpenGLRenderer::setViewport(int width, int height) {
     glViewport(0, 0, width, height);
 
     mat4 ortho;
@@ -47,11 +49,15 @@
     ortho.copyTo(mOrthoMatrix);
 }
 
-void UIOpenGLRenderer::prepare() {
+void OpenGLRenderer::prepare() {
     glDisable(GL_SCISSOR_TEST);
     glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
     glClear(GL_COLOR_BUFFER_BIT);
     glEnable(GL_SCISSOR_TEST);
 }
 
+void OpenGLRenderer::drawColor(int color, SkXfermode::Mode mode) {
+	LOGD("Drawing color");
+}
+
 }; // namespace android
diff --git a/libs/hwui/UIOpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
similarity index 72%
rename from libs/hwui/UIOpenGLRenderer.h
rename to libs/hwui/OpenGLRenderer.h
index 3b95e6a..1236336 100644
--- a/libs/hwui/UIOpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -14,24 +14,28 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_UI_OPENGL_RENDERER_H
-#define ANDROID_UI_OPENGL_RENDERER_H
+#ifndef ANDROID_OPENGL_RENDERER_H
+#define ANDROID_OPENGL_RENDERER_H
+
+#include <SkXfermode.h>
 
 namespace android {
 
-class UIOpenGLRenderer {
+class OpenGLRenderer {
 public:
-    UIOpenGLRenderer();
-    ~UIOpenGLRenderer();
+    OpenGLRenderer();
+    ~OpenGLRenderer();
 
     void setViewport(int width, int height);
     void prepare();
 
-private:
-    float mOrthoMatrix[16];
+    void drawColor(int color, SkXfermode::Mode mode);
 
+private:
+    // Matrix used for ortho projection in shaders
+    float mOrthoMatrix[16];
 };
 
 }; // namespace android
 
-#endif // ANDROID_UI_OPENGL_RENDERER_H
+#endif // ANDROID_OPENGL_RENDERER_H