Skip to content

Commit

Permalink
Gate assembly code out if not actually used, #43.
Browse files Browse the repository at this point in the history
  • Loading branch information
juj committed Nov 19, 2018
1 parent 7df6ec3 commit 4c8d863
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions diff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

Span *spans = 0;

#ifdef UPDATE_FRAMES_WITHOUT_DIFFING
// Naive non-diffing functionality: just submit the whole display contents
void NoDiffChangedRectangle(Span *&head)
{
Expand All @@ -18,7 +19,9 @@ void NoDiffChangedRectangle(Span *&head)
head->size = gpuFrameWidth*gpuFrameHeight;
head->next = 0;
}
#endif

#ifdef UPDATE_FRAMES_IN_SINGLE_RECTANGULAR_DIFF
// Coarse diffing of two framebuffers with tight stride, 16 pixels at a time
// Finds the first changed pixel, coarse result aligned down to 8 pixels boundary
static int coarse_linear_diff(uint16_t *framebuffer, uint16_t *prevFramebuffer, uint16_t *framebufferEnd)
Expand Down Expand Up @@ -275,6 +278,7 @@ void DiffFramebuffersToSingleChangedRectangle(uint16_t *framebuffer, uint16_t *p
head->size = (head->endX-head->x)*(head->endY-head->y-1) + (head->lastScanEndX - head->x);
head->next = 0;
}
#endif

void DiffFramebuffersToScanlineSpansFastAndCoarse4Wide(uint16_t *framebuffer, uint16_t *prevFramebuffer, bool interlacedDiff, int interlacedFieldParity, Span *&head)
{
Expand Down

0 comments on commit 4c8d863

Please sign in to comment.