Skip to content

Commit

Permalink
fix a corner case for list region calculators
Browse files Browse the repository at this point in the history
  • Loading branch information
GorgonMeducer committed Nov 25, 2024
1 parent 01a5f28 commit 7c0b5f8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 26 deletions.
2 changes: 1 addition & 1 deletion ARM.Arm-2D.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@
</RTE_Components_h>
</component>

<component Cclass="Acceleration" Cgroup="Arm-2D Helper" Csub="PFB" Cversion="2.4.1" condition="Arm-2D-CORE">
<component Cclass="Acceleration" Cgroup="Arm-2D Helper" Csub="PFB" Cversion="2.4.2" condition="Arm-2D-CORE">
<description>Helper services for LCD adaptor(s), e.g. Generic Partial Framebuffer, Scene Player etc.</description>
<files>
<file category="include" name="Helper/Include/" />
Expand Down
4 changes: 2 additions & 2 deletions Helper/Include/arm_2d_helper_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* Title: #include "arm_2d_helper_list.h"
* Description: Public header file for list core related services
*
* $Date: 24. Nov 2024
* $Revision: V.2.1.0
* $Date: 25. Nov 2024
* $Revision: V.2.1.1
*
* Target Processor: Cortex-M cores
* -------------------------------------------------------------------- */
Expand Down
47 changes: 24 additions & 23 deletions Helper/Source/arm_2d_helper_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* Title: #include "arm_2d_helper_list.h"
* Description: Public header file for list core related services
*
* $Date: 24. Nov 2024
* $Revision: V.2.1.0
* $Date: 25. Nov 2024
* $Revision: V.2.1.1
*
* Target Processor: Cortex-M cores
* -------------------------------------------------------------------- */
Expand Down Expand Up @@ -442,6 +442,7 @@ ARM_PT_BEGIN(this.Runtime.chState)
}
} while(0);


/* finish drawing */
if (!this.Runtime.bIsMoving) {
if (this.tCFG.nTotalLength > 0) {
Expand All @@ -456,6 +457,7 @@ ARM_PT_BEGIN(this.Runtime.chState)
}
}


label_end_of_list_core_task:
ARM_PT_END()

Expand Down Expand Up @@ -1235,18 +1237,18 @@ ARM_PT_BEGIN(this.chState)
nOffset = this.nOffset;
}

if (ARM_2D_ERR_NONE != __calculator_offset_update(ptThis, fnIterator, &nOffset, bMidAligned)) {
/* no valid item, return NULL */
ARM_PT_RETURN(NULL)
}

if (this.tCFG.nTotalLength) {
nOffset = __arm_2d_list_safe_mod(nOffset, this.tCFG.nTotalLength, bMidAligned);
if (nOffset >= 0) {
nOffset -= this.tCFG.nTotalLength;
}
}

if (ARM_2D_ERR_NONE != __calculator_offset_update(ptThis, fnIterator, &nOffset, bMidAligned)) {
/* no valid item, return NULL */
ARM_PT_RETURN(NULL)
}

/* no ring mode */
if (this.tCFG.bDisableRingMode) {

Expand Down Expand Up @@ -1702,18 +1704,18 @@ ARM_PT_BEGIN(this.chState)
nOffset = this.nOffset;
}

if (ARM_2D_ERR_NONE != __calculator_offset_update(ptThis, fnIterator, &nOffset, bMidAligned)) {
/* no valid item, return NULL */
ARM_PT_RETURN(NULL)
}

if (this.tCFG.nTotalLength) {
nOffset = __arm_2d_list_safe_mod(nOffset, this.tCFG.nTotalLength, bMidAligned);
if (nOffset >= 0) {
nOffset -= this.tCFG.nTotalLength;
}
}

if (ARM_2D_ERR_NONE != __calculator_offset_update(ptThis, fnIterator, &nOffset, bMidAligned)) {
/* no valid item, return NULL */
ARM_PT_RETURN(NULL)
}

/* no ring mode */
if (this.tCFG.bDisableRingMode) {

Expand Down Expand Up @@ -2171,19 +2173,18 @@ ARM_PT_BEGIN(this.chState)
nOffset = this.nOffset;
}

if (ARM_2D_ERR_NONE != __calculator_offset_update(ptThis, fnIterator, &nOffset, bMidAligned)) {
/* no valid item, return NULL */
ARM_PT_RETURN(NULL)
}

if (this.tCFG.nTotalLength) {
nOffset = __arm_2d_list_safe_mod(nOffset, this.tCFG.nTotalLength, bMidAligned);
if (nOffset >= 0) {
nOffset -= this.tCFG.nTotalLength;
}
}

if (ARM_2D_ERR_NONE != __calculator_offset_update(ptThis, fnIterator, &nOffset, bMidAligned)) {
/* no valid item, return NULL */
ARM_PT_RETURN(NULL)
}


/* no ring mode */
if (this.tCFG.bDisableRingMode) {

Expand Down Expand Up @@ -2662,18 +2663,18 @@ ARM_PT_BEGIN(this.chState)
nOffset = this.nOffset;
}

if (ARM_2D_ERR_NONE != __calculator_offset_update(ptThis, fnIterator, &nOffset, bMidAligned)) {
/* no valid item, return NULL */
ARM_PT_RETURN(NULL)
}

if (this.tCFG.nTotalLength) {
nOffset = __arm_2d_list_safe_mod(nOffset, this.tCFG.nTotalLength, bMidAligned);
if (nOffset >= 0) {
nOffset -= this.tCFG.nTotalLength;
}
}

if (ARM_2D_ERR_NONE != __calculator_offset_update(ptThis, fnIterator, &nOffset, bMidAligned)) {
/* no valid item, return NULL */
ARM_PT_RETURN(NULL)
}

/* no ring mode */
if (this.tCFG.bDisableRingMode) {

Expand Down

0 comments on commit 7c0b5f8

Please sign in to comment.