diff options
author | Chris Craik <ccraik@google.com> | 2014-12-22 17:16:56 -0800 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2014-12-23 16:53:56 -0800 |
commit | 51d6a3db97bdd5315f1a17a4b447d10a92217b98 (patch) | |
tree | 80803f8d2a5507e2d29bd58c7243a23fca343454 /libs/hwui/DisplayListOp.h | |
parent | e84a208317e0ed388fcdad1e6743c7849acb51b0 (diff) | |
download | frameworks_base-51d6a3db97bdd5315f1a17a4b447d10a92217b98.zip frameworks_base-51d6a3db97bdd5315f1a17a4b447d10a92217b98.tar.gz frameworks_base-51d6a3db97bdd5315f1a17a4b447d10a92217b98.tar.bz2 |
Cleanup various clang warnings, use unique_ptrs in several places
Change-Id: I347904b25e51fcc7de14b1e72f1acd0f6ba26f3f
Diffstat (limited to 'libs/hwui/DisplayListOp.h')
-rw-r--r-- | libs/hwui/DisplayListOp.h | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h index e4e5dfa..e42a9e4 100644 --- a/libs/hwui/DisplayListOp.h +++ b/libs/hwui/DisplayListOp.h @@ -17,10 +17,6 @@ #ifndef ANDROID_HWUI_DISPLAY_OPERATION_H #define ANDROID_HWUI_DISPLAY_OPERATION_H -#ifndef LOG_TAG - #define LOG_TAG "OpenGLRenderer" -#endif - #include <SkColor.h> #include <SkPath.h> #include <SkPathOps.h> @@ -39,11 +35,6 @@ #include "UvMapper.h" #include "utils/LinearAllocator.h" -#define CRASH() do { \ - *(int *)(uintptr_t) 0xbbadbeef = 0; \ - ((void(*)())0)(); /* More reliable, but doesn't say BBADBEEF */ \ -} while(false) - // Use OP_LOG for logging with arglist, OP_LOGS if just printing char* #define OP_LOGS(s) OP_LOG("%s", (s)) #define OP_LOG(s, ...) ALOGD( "%*s" s, level * 2, "", __VA_ARGS__ ) @@ -66,9 +57,9 @@ class DisplayListOp { public: // These objects should always be allocated with a LinearAllocator, and never destroyed/deleted. // standard new() intentionally not implemented, and delete/deconstructor should never be used. - virtual ~DisplayListOp() { CRASH(); } - static void operator delete(void* ptr) { CRASH(); } - /** static void* operator new(size_t size); PURPOSELY OMITTED **/ + virtual ~DisplayListOp() { LOG_ALWAYS_FATAL("Destructor not supported"); } + static void operator delete(void* ptr) { LOG_ALWAYS_FATAL("delete not supported"); } + static void* operator new(size_t size) = delete; /** PURPOSELY OMITTED **/ static void* operator new(size_t size, LinearAllocator& allocator) { return allocator.alloc(size); } @@ -93,10 +84,6 @@ public: class StateOp : public DisplayListOp { public: - StateOp() {}; - - virtual ~StateOp() {} - virtual void defer(DeferStateStruct& deferStruct, int saveCount, int level, bool useQuickReject) { // default behavior only affects immediate, deferrable state, issue directly to renderer @@ -869,7 +856,7 @@ public: patchOp->mLocalBounds.top + 0.5f); // Copy & transform all the vertices for the current operation - TextureVertex* opVertices = opMesh->vertices; + TextureVertex* opVertices = opMesh->vertices.get(); for (uint32_t j = 0; j < vertexCount; j++, opVertices++) { TextureVertex::set(vertex++, opVertices->x + tx, opVertices->y + ty, |