diff options
25 files changed, 185 insertions, 130 deletions
diff --git a/libpixelflinger/Android.mk b/libpixelflinger/Android.mk index 488003f..85d2c9c 100644 --- a/libpixelflinger/Android.mk +++ b/libpixelflinger/Android.mk @@ -16,8 +16,8 @@ PIXELFLINGER_SRC_FILES:= \ codeflinger/blending.cpp \ codeflinger/texturing.cpp \ codeflinger/disassem.c \ - tinyutils/SharedBuffer.cpp \ - tinyutils/VectorImpl.cpp \ + codeflinger/tinyutils/SharedBuffer.cpp \ + codeflinger/tinyutils/VectorImpl.cpp \ fixed.cpp.arm \ picker.cpp.arm \ pixelflinger.cpp.arm \ @@ -52,13 +52,6 @@ endif LOCAL_SHARED_LIBRARIES := libcutils -ifneq ($(TARGET_ARCH),arm) -# Required to define logging functions on the simulator. -# TODO: move the simulator logging functions into libcutils with -# the rest of the basic log stuff. -LOCAL_SHARED_LIBRARIES += libutils -endif - # # Shared library # diff --git a/libpixelflinger/codeflinger/ARMAssembler.cpp b/libpixelflinger/codeflinger/ARMAssembler.cpp index c4f42f5..607ed3c 100644 --- a/libpixelflinger/codeflinger/ARMAssembler.cpp +++ b/libpixelflinger/codeflinger/ARMAssembler.cpp @@ -28,9 +28,9 @@ #include <private/pixelflinger/ggl_context.h> -#include "codeflinger/ARMAssembler.h" -#include "codeflinger/CodeCache.h" -#include "codeflinger/disassem.h" +#include "ARMAssembler.h" +#include "CodeCache.h" +#include "disassem.h" // ---------------------------------------------------------------------------- diff --git a/libpixelflinger/codeflinger/ARMAssembler.h b/libpixelflinger/codeflinger/ARMAssembler.h index 06c66dd..c03dd9a 100644 --- a/libpixelflinger/codeflinger/ARMAssembler.h +++ b/libpixelflinger/codeflinger/ARMAssembler.h @@ -25,9 +25,8 @@ #include "tinyutils/KeyedVector.h" #include "tinyutils/smartpointer.h" -#include "tinyutils/smartpointer.h" -#include "codeflinger/ARMAssemblerInterface.h" -#include "codeflinger/CodeCache.h" +#include "ARMAssemblerInterface.h" +#include "CodeCache.h" namespace android { diff --git a/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp b/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp index 82180ee..073633c 100644 --- a/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp +++ b/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp @@ -22,7 +22,7 @@ #include <sys/types.h> #include <cutils/log.h> -#include "codeflinger/ARMAssemblerInterface.h" +#include "ARMAssemblerInterface.h" namespace android { diff --git a/libpixelflinger/codeflinger/ARMAssemblerProxy.cpp b/libpixelflinger/codeflinger/ARMAssemblerProxy.cpp index 7feed62..1c7bc76 100644 --- a/libpixelflinger/codeflinger/ARMAssemblerProxy.cpp +++ b/libpixelflinger/codeflinger/ARMAssemblerProxy.cpp @@ -19,7 +19,7 @@ #include <stdint.h> #include <sys/types.h> -#include "codeflinger/ARMAssemblerProxy.h" +#include "ARMAssemblerProxy.h" namespace android { diff --git a/libpixelflinger/codeflinger/ARMAssemblerProxy.h b/libpixelflinger/codeflinger/ARMAssemblerProxy.h index 5e3f763..70cb464 100644 --- a/libpixelflinger/codeflinger/ARMAssemblerProxy.h +++ b/libpixelflinger/codeflinger/ARMAssemblerProxy.h @@ -22,7 +22,7 @@ #include <stdint.h> #include <sys/types.h> -#include "codeflinger/ARMAssemblerInterface.h" +#include "ARMAssemblerInterface.h" namespace android { diff --git a/libpixelflinger/codeflinger/CodeCache.cpp b/libpixelflinger/codeflinger/CodeCache.cpp index f9ae00a..58fde7e 100644 --- a/libpixelflinger/codeflinger/CodeCache.cpp +++ b/libpixelflinger/codeflinger/CodeCache.cpp @@ -28,7 +28,7 @@ #include <cutils/log.h> -#include "codeflinger/CodeCache.h" +#include "CodeCache.h" namespace android { diff --git a/libpixelflinger/codeflinger/CodeCache.h b/libpixelflinger/codeflinger/CodeCache.h index 54fd69b..fa67dd0 100644 --- a/libpixelflinger/codeflinger/CodeCache.h +++ b/libpixelflinger/codeflinger/CodeCache.h @@ -28,6 +28,8 @@ namespace android { +using namespace tinyutils; + // ---------------------------------------------------------------------------- class AssemblyKeyBase { diff --git a/libpixelflinger/codeflinger/GGLAssembler.cpp b/libpixelflinger/codeflinger/GGLAssembler.cpp index 1ddf93d..0cb042e 100644 --- a/libpixelflinger/codeflinger/GGLAssembler.cpp +++ b/libpixelflinger/codeflinger/GGLAssembler.cpp @@ -24,7 +24,7 @@ #include <sys/types.h> #include <cutils/log.h> -#include "codeflinger/GGLAssembler.h" +#include "GGLAssembler.h" namespace android { diff --git a/libpixelflinger/codeflinger/GGLAssembler.h b/libpixelflinger/codeflinger/GGLAssembler.h index dd5f48e..d993684 100644 --- a/libpixelflinger/codeflinger/GGLAssembler.h +++ b/libpixelflinger/codeflinger/GGLAssembler.h @@ -24,7 +24,7 @@ #include <private/pixelflinger/ggl_context.h> -#include "codeflinger/ARMAssemblerProxy.h" +#include "ARMAssemblerProxy.h" namespace android { diff --git a/libpixelflinger/codeflinger/MIPSAssembler.cpp b/libpixelflinger/codeflinger/MIPSAssembler.cpp index 7888a0e..a88d2fe 100644 --- a/libpixelflinger/codeflinger/MIPSAssembler.cpp +++ b/libpixelflinger/codeflinger/MIPSAssembler.cpp @@ -61,9 +61,9 @@ #include <private/pixelflinger/ggl_context.h> -#include "codeflinger/MIPSAssembler.h" -#include "codeflinger/CodeCache.h" -#include "codeflinger/mips_disassem.h" +#include "MIPSAssembler.h" +#include "CodeCache.h" +#include "mips_disassem.h" // Choose MIPS arch variant following gcc flags #if defined(__mips__) && __mips==32 && __mips_isa_rev>=2 diff --git a/libpixelflinger/codeflinger/MIPSAssembler.h b/libpixelflinger/codeflinger/MIPSAssembler.h index d8e8165..430ab06 100644 --- a/libpixelflinger/codeflinger/MIPSAssembler.h +++ b/libpixelflinger/codeflinger/MIPSAssembler.h @@ -21,12 +21,12 @@ #include <stdint.h> #include <sys/types.h> -#include <utils/Vector.h> -#include <utils/KeyedVector.h> - +#include "tinyutils/KeyedVector.h" +#include "tinyutils/Vector.h" #include "tinyutils/smartpointer.h" -#include "codeflinger/ARMAssemblerInterface.h" -#include "codeflinger/CodeCache.h" + +#include "ARMAssemblerInterface.h" +#include "CodeCache.h" namespace android { diff --git a/libpixelflinger/codeflinger/blending.cpp b/libpixelflinger/codeflinger/blending.cpp index c90eaa0..b20219c 100644 --- a/libpixelflinger/codeflinger/blending.cpp +++ b/libpixelflinger/codeflinger/blending.cpp @@ -23,7 +23,7 @@ #include <cutils/log.h> -#include "codeflinger/GGLAssembler.h" +#include "GGLAssembler.h" namespace android { diff --git a/libpixelflinger/codeflinger/load_store.cpp b/libpixelflinger/codeflinger/load_store.cpp index 146fa52..0a46eaa 100644 --- a/libpixelflinger/codeflinger/load_store.cpp +++ b/libpixelflinger/codeflinger/load_store.cpp @@ -18,7 +18,7 @@ #include <assert.h> #include <stdio.h> #include <cutils/log.h> -#include "codeflinger/GGLAssembler.h" +#include "GGLAssembler.h" #ifdef __ARM_ARCH__ #include <machine/cpu-features.h> diff --git a/libpixelflinger/codeflinger/texturing.cpp b/libpixelflinger/codeflinger/texturing.cpp index 4d5a50f..9e3d217 100644 --- a/libpixelflinger/codeflinger/texturing.cpp +++ b/libpixelflinger/codeflinger/texturing.cpp @@ -23,7 +23,7 @@ #include <cutils/log.h> -#include "codeflinger/GGLAssembler.h" +#include "GGLAssembler.h" #ifdef __ARM_ARCH__ #include <machine/cpu-features.h> diff --git a/libpixelflinger/tinyutils/Errors.h b/libpixelflinger/codeflinger/tinyutils/Errors.h index b9fd5f4..47ae9d7 100644 --- a/libpixelflinger/tinyutils/Errors.h +++ b/libpixelflinger/codeflinger/tinyutils/Errors.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 The Android Open Source Project + * Copyright 2007 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. @@ -14,13 +14,14 @@ * limitations under the License. */ -#ifndef ANDROID_ERRORS_H -#define ANDROID_ERRORS_H +#ifndef ANDROID_PIXELFLINGER_ERRORS_H +#define ANDROID_PIXELFLINGER_ERRORS_H #include <sys/types.h> #include <errno.h> namespace android { +namespace tinyutils { // use this type to return error codes typedef int32_t status_t; @@ -31,32 +32,17 @@ typedef int32_t status_t; */ enum { - OK = 0, // Everything's swell. NO_ERROR = 0, // No errors. - - UNKNOWN_ERROR = 0x80000000, - NO_MEMORY = -ENOMEM, - INVALID_OPERATION = -ENOSYS, BAD_VALUE = -EINVAL, - BAD_TYPE = 0x80000001, - NAME_NOT_FOUND = -ENOENT, - PERMISSION_DENIED = -EPERM, - NO_INIT = -ENODEV, - ALREADY_EXISTS = -EEXIST, - DEAD_OBJECT = -EPIPE, - FAILED_TRANSACTION = 0x80000002, - JPARKS_BROKE_IT = -EPIPE, BAD_INDEX = -EOVERFLOW, - NOT_ENOUGH_DATA = -ENODATA, - WOULD_BLOCK = -EWOULDBLOCK, - TIMED_OUT = -ETIME, - UNKNOWN_TRANSACTION = -EBADMSG, + NAME_NOT_FOUND = -ENOENT, }; -}; // namespace android +} // namespace tinyutils +} // namespace android // --------------------------------------------------------------------------- -#endif // ANDROID_ERRORS_H +#endif // ANDROID_PIXELFLINGER_ERRORS_H diff --git a/libpixelflinger/tinyutils/KeyedVector.h b/libpixelflinger/codeflinger/tinyutils/KeyedVector.h index 1be2094..9d8668b 100644 --- a/libpixelflinger/tinyutils/KeyedVector.h +++ b/libpixelflinger/codeflinger/tinyutils/KeyedVector.h @@ -1,25 +1,34 @@ /* - * keyed_vector.h - * Android + * Copyright 2005 The Android Open Source Project * - * Created on 11/18/05. - * Copyright 2005 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_KEYED_VECTOR_H -#define ANDROID_KEYED_VECTOR_H +#ifndef ANDROID_PIXELFLINGER_KEYED_VECTOR_H +#define ANDROID_PIXELFLINGER_KEYED_VECTOR_H #include <assert.h> #include <stdint.h> #include <sys/types.h> -#include "tinyutils/SortedVector.h" -#include "tinyutils/TypeHelpers.h" +#include "Errors.h" +#include "SortedVector.h" +#include "TypeHelpers.h" // --------------------------------------------------------------------------- namespace android { +namespace tinyutils { template <typename KEY, typename VALUE> class KeyedVector @@ -186,8 +195,9 @@ const VALUE& DefaultKeyedVector<KEY,VALUE>::valueFor(const KEY& key) const { return i >= 0 ? KeyedVector<KEY,VALUE>::valueAt(i) : mDefault; } -}; // namespace android +} // namespace tinyutils +} // namespace android // --------------------------------------------------------------------------- -#endif // ANDROID_KEYED_VECTOR_H +#endif // ANDROID_PIXELFLINGER_KEYED_VECTOR_H diff --git a/libpixelflinger/tinyutils/SharedBuffer.cpp b/libpixelflinger/codeflinger/tinyutils/SharedBuffer.cpp index ef781a7..ef453fa 100644 --- a/libpixelflinger/tinyutils/SharedBuffer.cpp +++ b/libpixelflinger/codeflinger/tinyutils/SharedBuffer.cpp @@ -1,9 +1,17 @@ /* - * SharedBuffer.cpp - * Android + * Copyright 2005 The Android Open Source Project * - * Copyright 2005 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. */ #include <stdlib.h> @@ -11,11 +19,12 @@ #include <cutils/atomic.h> -#include "tinyutils/SharedBuffer.h" +#include "SharedBuffer.h" // --------------------------------------------------------------------------- namespace android { +namespace tinyutils { SharedBuffer* SharedBuffer::alloc(size_t size) { @@ -102,5 +111,5 @@ int32_t SharedBuffer::release(uint32_t flags) const return prev; } - -}; // namespace android +} // namespace tinyutils +} // namespace android diff --git a/libpixelflinger/tinyutils/SharedBuffer.h b/libpixelflinger/codeflinger/tinyutils/SharedBuffer.h index 9f63121..d69b417 100644 --- a/libpixelflinger/tinyutils/SharedBuffer.h +++ b/libpixelflinger/codeflinger/tinyutils/SharedBuffer.h @@ -1,13 +1,21 @@ /* - * SharedBuffer.h - * Android + * Copyright 2005 The Android Open Source Project * - * Copyright 2005 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_SHARED_BUFFER_H -#define ANDROID_SHARED_BUFFER_H +#ifndef ANDROID_PIXELFLINGER_SHARED_BUFFER_H +#define ANDROID_PIXELFLINGER_SHARED_BUFFER_H #include <stdint.h> #include <sys/types.h> @@ -15,6 +23,7 @@ // --------------------------------------------------------------------------- namespace android { +namespace tinyutils { class SharedBuffer { @@ -131,8 +140,9 @@ bool SharedBuffer::onlyOwner() const { return (mRefs == 1); } -}; // namespace android +} // namespace tinyutils +} // namespace android // --------------------------------------------------------------------------- -#endif // ANDROID_VECTOR_H +#endif // ANDROID_PIXELFLINGER_SHARED_BUFFER_H diff --git a/libpixelflinger/tinyutils/SortedVector.h b/libpixelflinger/codeflinger/tinyutils/SortedVector.h index 7a6b443..a2b7005 100644 --- a/libpixelflinger/tinyutils/SortedVector.h +++ b/libpixelflinger/codeflinger/tinyutils/SortedVector.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005 The Android Open Source Project + * Copyright 2005 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. @@ -14,20 +14,21 @@ * limitations under the License. */ -#ifndef ANDROID_SORTED_VECTOR_H -#define ANDROID_SORTED_VECTOR_H +#ifndef ANDROID_PIXELFLINGER_SORTED_VECTOR_H +#define ANDROID_PIXELFLINGER_SORTED_VECTOR_H #include <assert.h> #include <stdint.h> #include <sys/types.h> -#include "tinyutils/Vector.h" -#include "tinyutils/VectorImpl.h" -#include "tinyutils/TypeHelpers.h" +#include "Vector.h" +#include "VectorImpl.h" +#include "TypeHelpers.h" // --------------------------------------------------------------------------- namespace android { +namespace tinyutils { template <class TYPE> class SortedVector : private SortedVectorImpl @@ -274,9 +275,10 @@ int SortedVector<TYPE>::do_compare(const void* lhs, const void* rhs) const { return compare_type( *reinterpret_cast<const TYPE*>(lhs), *reinterpret_cast<const TYPE*>(rhs) ); } -}; // namespace android +} // namespace tinyutils +} // namespace android // --------------------------------------------------------------------------- -#endif // ANDROID_SORTED_VECTOR_H +#endif // ANDROID_PIXELFLINGER_SORTED_VECTOR_H diff --git a/libpixelflinger/tinyutils/TypeHelpers.h b/libpixelflinger/codeflinger/tinyutils/TypeHelpers.h index 9500c90..7abff07 100644 --- a/libpixelflinger/tinyutils/TypeHelpers.h +++ b/libpixelflinger/codeflinger/tinyutils/TypeHelpers.h @@ -1,12 +1,21 @@ /* - * TypeHelpers.h - * - * Copyright 2005 The Android Open Source Project + * Copyright 2005 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_TYPE_HELPERS_H -#define ANDROID_TYPE_HELPERS_H +#ifndef ANDROID_PIXELFLINGER_TYPE_HELPERS_H +#define ANDROID_PIXELFLINGER_TYPE_HELPERS_H #include <new> #include <stdint.h> @@ -16,6 +25,7 @@ // --------------------------------------------------------------------------- namespace android { +namespace tinyutils { /* * Types traits @@ -238,8 +248,9 @@ struct trait_trivial_assign< key_value_pair_t<K, V> > // --------------------------------------------------------------------------- -}; // namespace android +} // namespace tinyutils +} // namespace android // --------------------------------------------------------------------------- -#endif // ANDROID_TYPE_HELPERS_H +#endif // ANDROID_PIXELFLINGER_TYPE_HELPERS_H diff --git a/libpixelflinger/tinyutils/Vector.h b/libpixelflinger/codeflinger/tinyutils/Vector.h index 14cf99a..c07a17a 100644 --- a/libpixelflinger/tinyutils/Vector.h +++ b/libpixelflinger/codeflinger/tinyutils/Vector.h @@ -1,13 +1,21 @@ /* - * vector.h - * Android + * Copyright 2005 The Android Open Source Project * - * Copyright 2005 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_VECTOR_H -#define ANDROID_VECTOR_H +#ifndef ANDROID_PIXELFLINGER_VECTOR_H +#define ANDROID_PIXELFLINGER_VECTOR_H #include <new> #include <stdint.h> @@ -15,13 +23,14 @@ #include <cutils/log.h> -#include "tinyutils/Errors.h" -#include "tinyutils/VectorImpl.h" -#include "tinyutils/TypeHelpers.h" +#include "Errors.h" +#include "VectorImpl.h" +#include "TypeHelpers.h" // --------------------------------------------------------------------------- namespace android { +namespace tinyutils { /*! * The main templated vector class ensuring type safety @@ -335,9 +344,10 @@ void Vector<TYPE>::do_move_backward(void* dest, const void* from, size_t num) co move_backward_type( reinterpret_cast<TYPE*>(dest), reinterpret_cast<const TYPE*>(from), num ); } -}; // namespace android +} // namespace tinyutils +} // namespace android // --------------------------------------------------------------------------- -#endif // ANDROID_VECTOR_H +#endif // ANDROID_PIXELFLINGER_VECTOR_H diff --git a/libpixelflinger/tinyutils/VectorImpl.cpp b/libpixelflinger/codeflinger/tinyutils/VectorImpl.cpp index 05c4945..689129a 100644 --- a/libpixelflinger/tinyutils/VectorImpl.cpp +++ b/libpixelflinger/codeflinger/tinyutils/VectorImpl.cpp @@ -1,9 +1,17 @@ /* - * vector_impl.cpp - * Android + * Copyright 2005 The Android Open Source Project * - * Copyright 2005 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. */ #define LOG_TAG "Vector" @@ -15,21 +23,15 @@ #include <cutils/log.h> -#include "tinyutils/SharedBuffer.h" -#include "tinyutils/VectorImpl.h" +#include "Errors.h" +#include "SharedBuffer.h" +#include "VectorImpl.h" /*****************************************************************************/ namespace android { - -enum { - NO_ERROR = 0, // No errors. - NO_MEMORY = -ENOMEM, - BAD_VALUE = -EINVAL, - BAD_INDEX = -EOVERFLOW, - NAME_NOT_FOUND = -ENOENT, -}; +namespace tinyutils { // ---------------------------------------------------------------------------- @@ -548,5 +550,6 @@ void SortedVectorImpl::reservedSortedVectorImpl8() { }; /*****************************************************************************/ -}; // namespace android +} // namespace tinyutils +} // namespace android diff --git a/libpixelflinger/tinyutils/VectorImpl.h b/libpixelflinger/codeflinger/tinyutils/VectorImpl.h index e868eca..56089b3 100644 --- a/libpixelflinger/tinyutils/VectorImpl.h +++ b/libpixelflinger/codeflinger/tinyutils/VectorImpl.h @@ -1,13 +1,21 @@ /* - * vector_impl.h - * Android + * Copyright 2005 The Android Open Source Project * - * Copyright 2005 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_VECTOR_IMPL_H -#define ANDROID_VECTOR_IMPL_H +#ifndef ANDROID_PIXELFLINGER_VECTOR_IMPL_H +#define ANDROID_PIXELFLINGER_VECTOR_IMPL_H #include <assert.h> #include <stdint.h> @@ -18,6 +26,7 @@ // --------------------------------------------------------------------------- namespace android { +namespace tinyutils { /*! * Implementation of the guts of the vector<> class @@ -177,9 +186,10 @@ private: ssize_t replaceAt(const void* item, size_t index); }; -}; // namespace android +} // namespace tinyutils +} // namespace android // --------------------------------------------------------------------------- -#endif // ANDROID_VECTOR_IMPL_H +#endif // ANDROID_PIXELFLINGER_VECTOR_IMPL_H diff --git a/libpixelflinger/tinyutils/smartpointer.h b/libpixelflinger/codeflinger/tinyutils/smartpointer.h index 88032d7..9d0a16e 100644 --- a/libpixelflinger/tinyutils/smartpointer.h +++ b/libpixelflinger/codeflinger/tinyutils/smartpointer.h @@ -1,13 +1,21 @@ /* - * smartpointer.h - * Android + * Copyright 2005 The Android Open Source Project * - * Copyright 2005 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_SMART_POINTER_H -#define ANDROID_SMART_POINTER_H +#ifndef ANDROID_PIXELFLINGER_SMART_POINTER_H +#define ANDROID_PIXELFLINGER_SMART_POINTER_H #include <stdint.h> #include <sys/types.h> @@ -15,6 +23,7 @@ // --------------------------------------------------------------------------- namespace android { +namespace tinyutils { // --------------------------------------------------------------------------- @@ -163,8 +172,9 @@ void sp<T>::clear() // --------------------------------------------------------------------------- -}; // namespace android +} // namespace tinyutils +} // namespace android // --------------------------------------------------------------------------- -#endif // ANDROID_SMART_POINTER_H +#endif // ANDROID_PIXELFLINGER_SMART_POINTER_H |