OSDN Git Service

Refactor Android includes.
authorNicolas Capens <capn@google.com>
Fri, 4 Aug 2017 13:36:32 +0000 (09:36 -0400)
committerNicolas Capens <nicolascapens@google.com>
Fri, 4 Aug 2017 15:02:08 +0000 (15:02 +0000)
Forward declare ANativeWindow, and remove <hardware/gralloc.h> where
GrallocAndroid.hpp already includes it.

Change-Id: Idebd4c40280960ff00cd51b6633c1c84a8cf7de2
Reviewed-on: https://swiftshader-review.googlesource.com/11288
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
src/Main/FrameBufferAndroid.cpp
src/Main/FrameBufferAndroid.hpp
src/OpenGL/common/Image.hpp

index 7340921..49957c8 100644 (file)
@@ -15,6 +15,7 @@
 #include "FrameBufferAndroid.hpp"
 #include "GrallocAndroid.hpp"
 
+#include <system/window.h>
 #include <cutils/log.h>
 
 namespace sw
index 7e34ea2..4400188 100644 (file)
@@ -18,8 +18,8 @@
 #include "Main/FrameBuffer.hpp"
 #include "Common/Debug.hpp"
 
-#include <hardware/gralloc.h>
-#include <system/window.h>
+struct ANativeWindow;
+struct ANativeWindowBuffer;
 
 namespace sw
 {
index c2e7f53..e13b19e 100644 (file)
@@ -22,7 +22,6 @@
 #include <GLES2/gl2ext.h>
 
 #if defined(__ANDROID__)
-#include <hardware/gralloc.h>
 #include <system/window.h>
 #include "../../Common/GrallocAndroid.hpp"
 #include "../../Common/DebugAndroid.hpp"