Fix google-build-using-namespace warnings in driver. * Replace "using namespace ..." statements with using declarations of the required names. * Put extern "C" functions inside a namespace to save a lot of using declarations. Their linkage names are not changed but can access names in the namespace easily. Bug: 32670901 Test: build with WITH_TIDY=1 Change-Id: I7a2d45ecab47bc9064701fd288fe31f47b28fcc9
diff --git a/driver/rsdAllocation.cpp b/driver/rsdAllocation.cpp index 3816c23..83d4407 100644 --- a/driver/rsdAllocation.cpp +++ b/driver/rsdAllocation.cpp
@@ -44,8 +44,21 @@ #include <malloc.h> #endif -using namespace android; -using namespace android::renderscript; +#ifndef RS_COMPATIBILITY_LIB +using android::GraphicBufferMapper; +using android::PIXEL_FORMAT_RGBA_8888; +using android::Rect; +#endif + +using android::renderscript::Allocation; +using android::renderscript::Context; +using android::renderscript::Element; +using android::renderscript::Type; +using android::renderscript::rs_allocation; +using android::renderscript::rsBoxFilter565; +using android::renderscript::rsBoxFilter8888; +using android::renderscript::rsMax; +using android::renderscript::rsRound; #ifndef RS_COMPATIBILITY_LIB const static GLenum gFaceOrder[] = {