summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2013-08-15 17:30:12 -0700
committerStephen Hines <srhines@google.com>2013-08-15 17:41:19 -0700
commit10f317038dd53543dc8c7f5afe26a6360adfb5f3 (patch)
treee1f55736387fb5ea6df940ebfa4990324479834f
parent43cfc0cbe6e6e8f585a0ae5f1d9cc2859ab1dda7 (diff)
downloadrs-10f317038dd53543dc8c7f5afe26a6360adfb5f3.tar.gz
Fix up dependencies further for RS compatibility library.
Removed cutils dependency from rsdCore.cpp. Removed system/grapics.h dependency by bringing in the only enum we use. Change-Id: I0de6c0c2e049c78cc20516cfa2035291da2a0f04
-rw-r--r--driver/rsdAllocation.cpp6
-rw-r--r--driver/rsdCore.cpp4
-rw-r--r--rsCompatibilityLib.h7
-rw-r--r--rsType.cpp6
4 files changed, 15 insertions, 8 deletions
diff --git a/driver/rsdAllocation.cpp b/driver/rsdAllocation.cpp
index 2daafbe4..5bdf6b7b 100644
--- a/driver/rsdAllocation.cpp
+++ b/driver/rsdAllocation.cpp
@@ -23,11 +23,11 @@
#include "system/window.h"
#include "ui/Rect.h"
#include "ui/GraphicBufferMapper.h"
-#else
-#include "system/graphics.h"
#endif
-#ifndef RS_COMPATIBILITY_LIB
+#ifdef RS_COMPATIBILITY_LIB
+#include "rsCompatibilityLib.h"
+#else
#include "rsdFrameBufferObj.h"
#include "gui/GLConsumer.h"
#include "gui/CpuConsumer.h"
diff --git a/driver/rsdCore.cpp b/driver/rsdCore.cpp
index d69255b6..305619b1 100644
--- a/driver/rsdCore.cpp
+++ b/driver/rsdCore.cpp
@@ -41,10 +41,6 @@
#include <sys/syscall.h>
#include <string.h>
-#ifndef RS_SERVER
-#include <cutils/properties.h>
-#endif
-
using namespace android;
using namespace android::renderscript;
diff --git a/rsCompatibilityLib.h b/rsCompatibilityLib.h
index 785ee962..4abc011e 100644
--- a/rsCompatibilityLib.h
+++ b/rsCompatibilityLib.h
@@ -21,6 +21,13 @@
#error "THIS HEADER IS ONLY VALID FOR BUILDING OUR COMPATIBILITY LIBRARY"
#endif
+// from system/graphics.h
+enum {
+ HAL_PIXEL_FORMAT_YV12 = 0x32315659, // YCrCb 4:2:0 Planar
+ HAL_PIXEL_FORMAT_YCrCb_420_SP = 0x11, // NV21
+};
+
+// from cutils/properties.h
#define PROPERTY_KEY_MAX 32
#define PROPERTY_VALUE_MAX 92
diff --git a/rsType.cpp b/rsType.cpp
index 9719a04e..0d1fed6b 100644
--- a/rsType.cpp
+++ b/rsType.cpp
@@ -16,10 +16,14 @@
#include "rsContext.h"
-#ifndef RS_SERVER
+#if !defined(RS_SERVER) && !defined(RS_COMPATIBILITY_LIB)
#include "system/graphics.h"
#endif
+#ifdef RS_COMPATIBILITY_LIB
+#include "rsCompatibilityLib.h"
+#endif
+
using namespace android;
using namespace android::renderscript;