diff -r ca9e48af31e6 -r 1f607fa8542f MiniDisplay/FutabaVfd.cpp --- a/MiniDisplay/FutabaVfd.cpp Fri May 30 15:02:15 2014 +0200 +++ b/MiniDisplay/FutabaVfd.cpp Sun Jun 01 21:15:33 2014 +0200 @@ -74,7 +74,7 @@ GP1212A01A::GP1212A01A(): iDisplayPositionX(0),iDisplayPositionY(0), iOffScreenMode(true), - iUseFrameDiffAlgo(true), + iUseFrameDifferencing(true), iFrameNext(NULL), iFrameCurrent(NULL), iFramePrevious(NULL), @@ -376,7 +376,7 @@ if (OffScreenMode()) { //Send host back buffer to device back buffer - if (!iUseFrameDiffAlgo || iNeedFullFrameUpdatePtr()); @@ -406,20 +406,20 @@ } +//Define the edge of our pixel block +//Pixel blocks of 32x32 seems to run almost as fast as full screen update in worse case scenarii. +//Though I wonder if in some situations 16 could be better. Make this an attribute at some point if need be. +const int KPixelBlockEdge = 32; +const int KPixelBlockSizeInBits = KPixelBlockEdge*KPixelBlockEdge; +const int KPixelBlockSizeInBytes = KPixelBlockSizeInBits/8; + + /** * @brief GP1212A01A::SendModifiedPixelBlocks * Compare our back and front buffer and send to the device only the modified pixels. */ void GP1212A01A::SendModifiedPixelBlocks() { - //The largest pixel block we can sanely send with one report is 16*16 - //const int KBlocksPerRow = WidthInPixels()/16; //16 - //const int KBlocksPerColumn = HeightInPixels()/16; //4 - - const int KPixelBlockEdge = 16; - const int KPixelBlockSizeInBits = KPixelBlockEdge*KPixelBlockEdge; - const int KPixelBlockSizeInBytes = KPixelBlockSizeInBits/8; - int w=WidthInPixels(); int h=HeightInPixels();