diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/Snapshot.h | 32 | ||||
-rw-r--r-- | libs/rs/driver/rsdBcc.cpp | 5 | ||||
-rw-r--r-- | libs/rs/scriptc/rs_allocation.rsh | 3 | ||||
-rw-r--r-- | libs/rs/scriptc/rs_atomic.rsh | 2 | ||||
-rw-r--r-- | libs/rs/scriptc/rs_graphics.rsh | 7 | ||||
-rw-r--r-- | libs/rs/scriptc/rs_matrix.rsh | 2 | ||||
-rw-r--r-- | libs/rs/scriptc/rs_types.rsh | 3 |
7 files changed, 29 insertions, 25 deletions
diff --git a/libs/hwui/Snapshot.h b/libs/hwui/Snapshot.h index bd70319..d51154d 100644 --- a/libs/hwui/Snapshot.h +++ b/libs/hwui/Snapshot.h @@ -70,13 +70,6 @@ public: clipRect = s->clipRect; } - if ((s->flags & Snapshot::kFlagClipSet) && - !(s->flags & Snapshot::kFlagDirtyLocalClip)) { - mLocalClip.set(s->mLocalClip); - } else { - flags |= Snapshot::kFlagDirtyLocalClip; - } - if (s->flags & Snapshot::kFlagFboTarget) { flags |= Snapshot::kFlagFboTarget; region = s->region; @@ -106,18 +99,14 @@ public: */ kFlagIsFboLayer = 0x4, /** - * Indicates that the local clip should be recomputed. - */ - kFlagDirtyLocalClip = 0x8, - /** * Indicates that this snapshot has changed the ortho matrix. */ - kFlagDirtyOrtho = 0x10, + kFlagDirtyOrtho = 0x8, /** * Indicates that this snapshot or an ancestor snapshot is * an FBO layer. */ - kFlagFboTarget = 0x20 + kFlagFboTarget = 0x10 }; /** @@ -169,7 +158,7 @@ public: } if (clipped) { - flags |= Snapshot::kFlagClipSet | Snapshot::kFlagDirtyLocalClip; + flags |= Snapshot::kFlagClipSet; } return clipped; @@ -180,19 +169,16 @@ public: */ void setClip(float left, float top, float right, float bottom) { clipRect->set(left, top, right, bottom); - flags |= Snapshot::kFlagClipSet | Snapshot::kFlagDirtyLocalClip; + flags |= Snapshot::kFlagClipSet; } const Rect& getLocalClip() { - if (flags & Snapshot::kFlagDirtyLocalClip) { - mat4 inverse; - inverse.loadInverse(*transform); + mat4 inverse; + inverse.loadInverse(*transform); - mLocalClip.set(*clipRect); - inverse.mapRect(mLocalClip); + mLocalClip.set(*clipRect); + inverse.mapRect(mLocalClip); - flags &= ~Snapshot::kFlagDirtyLocalClip; - } return mLocalClip; } @@ -204,7 +190,7 @@ public: void resetClip(float left, float top, float right, float bottom) { clipRect = &mClipRectRoot; clipRect->set(left, top, right, bottom); - flags |= Snapshot::kFlagClipSet | Snapshot::kFlagDirtyLocalClip; + flags |= Snapshot::kFlagClipSet; } bool isIgnored() const { diff --git a/libs/rs/driver/rsdBcc.cpp b/libs/rs/driver/rsdBcc.cpp index 0755fb7..5fd5c35 100644 --- a/libs/rs/driver/rsdBcc.cpp +++ b/libs/rs/driver/rsdBcc.cpp @@ -302,7 +302,10 @@ void rsdScriptInvokeForEach(const Context *rsc, DrvScript *drv = (DrvScript *)s->mHal.drv; // We only support slot 0 (root) at this point in time. rsAssert(slot == 0); - mtls.sig = drv->mExportForEachSignatureList[slot]; + mtls.sig = 0x1f; // temp fix for old apps, full table in slang_rs_export_foreach.cpp + if (drv->mExportForEachSignatureList) { + mtls.sig = drv->mExportForEachSignatureList[slot]; + } if (ain) { mtls.dimX = ain->getType()->getDimX(); mtls.dimY = ain->getType()->getDimY(); diff --git a/libs/rs/scriptc/rs_allocation.rsh b/libs/rs/scriptc/rs_allocation.rsh index 1e755cd..154a099 100644 --- a/libs/rs/scriptc/rs_allocation.rsh +++ b/libs/rs/scriptc/rs_allocation.rsh @@ -71,6 +71,8 @@ extern uint32_t __attribute__((overloadable)) extern uint32_t __attribute__((overloadable)) rsAllocationGetDimFaces(rs_allocation); +#if (defined(RS_VERSION) && (RS_VERSION >= 14)) + /** * Copy part of an allocation from another allocation. * @@ -123,6 +125,7 @@ extern void __attribute__((overloadable)) uint32_t srcMip, rs_allocation_cubemap_face srcFace); +#endif //defined(RS_VERSION) && (RS_VERSION >= 14) /** * Extract a single element from an allocation. diff --git a/libs/rs/scriptc/rs_atomic.rsh b/libs/rs/scriptc/rs_atomic.rsh index 95513ad..87c6c02 100644 --- a/libs/rs/scriptc/rs_atomic.rsh +++ b/libs/rs/scriptc/rs_atomic.rsh @@ -23,6 +23,7 @@ #ifndef __RS_ATOMIC_RSH__ #define __RS_ATOMIC_RSH__ +#if (defined(RS_VERSION) && (RS_VERSION >= 14)) /** * Atomic add one to the value at addr. @@ -243,6 +244,7 @@ extern int32_t __attribute__((overloadable)) extern uint32_t __attribute__((overloadable)) rsAtomicCas(volatile uint32_t* addr, int32_t compareValue, int32_t newValue); +#endif //defined(RS_VERSION) && (RS_VERSION >= 14) #endif diff --git a/libs/rs/scriptc/rs_graphics.rsh b/libs/rs/scriptc/rs_graphics.rsh index 00fd1b1..3e9339e 100644 --- a/libs/rs/scriptc/rs_graphics.rsh +++ b/libs/rs/scriptc/rs_graphics.rsh @@ -23,6 +23,7 @@ #ifndef __RS_GRAPHICS_RSH__ #define __RS_GRAPHICS_RSH__ +#if (defined(RS_VERSION) && (RS_VERSION >= 14)) /** * Set the color target used for all subsequent rendering calls * @param colorTarget @@ -64,6 +65,8 @@ extern void __attribute__((overloadable)) extern uint __attribute__((overloadable)) rsgFinish(void); +#endif //defined(RS_VERSION) && (RS_VERSION >= 14) + /** * Bind a new ProgramFragment to the rendering context. * @@ -187,6 +190,8 @@ extern uint __attribute__((overloadable)) extern void __attribute__((overloadable)) rsgAllocationSyncAll(rs_allocation alloc); +#if (defined(RS_VERSION) && (RS_VERSION >= 14)) + /** * Sync the contents of an allocation from memory space * specified by source. @@ -198,6 +203,8 @@ extern void __attribute__((overloadable)) rsgAllocationSyncAll(rs_allocation alloc, rs_allocation_usage_type source); +#endif //defined(RS_VERSION) && (RS_VERSION >= 14) + /** * Low performance utility function for drawing a simple rectangle. Not * intended for drawing large quantities of geometry. diff --git a/libs/rs/scriptc/rs_matrix.rsh b/libs/rs/scriptc/rs_matrix.rsh index ab3cd3b..ebff7f4 100644 --- a/libs/rs/scriptc/rs_matrix.rsh +++ b/libs/rs/scriptc/rs_matrix.rsh @@ -308,7 +308,7 @@ rsMatrixMultiply(rs_matrix2x2 *m, float2 in); #else /** * Multiply a vector by a matrix and return the result vector. - * API version 10-13 + * API version 14+ */ _RS_RUNTIME float4 __attribute__((overloadable)) rsMatrixMultiply(const rs_matrix4x4 *m, float4 in); diff --git a/libs/rs/scriptc/rs_types.rsh b/libs/rs/scriptc/rs_types.rsh index 5d5df60..e9c3c5e 100644 --- a/libs/rs/scriptc/rs_types.rsh +++ b/libs/rs/scriptc/rs_types.rsh @@ -366,6 +366,7 @@ typedef float4 rs_quaternion; #define RS_PACKED __attribute__((packed, aligned(4))) #define NULL ((const void *)0) +#if (defined(RS_VERSION) && (RS_VERSION >= 14)) /** * \brief Enum for selecting cube map faces @@ -393,4 +394,6 @@ typedef enum { RS_ALLOCATION_USAGE_GRAPHICS_RENDER_TARGET = 0x0010 } rs_allocation_usage_type; +#endif //defined(RS_VERSION) && (RS_VERSION >= 14) + #endif |