#include "SkTouchGesture.h"
#include "SkTypeface.h"
+#define TEST_GPIPEx
+
+#ifdef TEST_GPIPE
+#define PIPE_FILE
+#define FILE_PATH "/path/to/drawing.data"
+#endif
+
#define USE_ARROWS_FOR_ZOOM true
//#define DEFAULT_TO_GPU
}
SampleWindow::SampleWindow(void* hwnd) : INHERITED(hwnd) {
+#ifdef PIPE_FILE
+ //Clear existing file or create file if it doesn't exist
+ FILE* f = fopen(FILE_PATH, "wb");
+ fclose(f);
+#endif
+
fPicture = NULL;
fGpuCanvas = NULL;
return this->INHERITED::onQuery(evt);
}
-#define TEST_GPIPEx
-
#ifdef TEST_GPIPE
#include "SkGPipe.h"
void SimplePC::notifyWritten(size_t bytes) {
SkASSERT(fBytesWritten + bytes <= fBlockSize);
-
+
+#ifdef PIPE_FILE
+ //File is open in append mode
+ FILE* f = fopen(FILE_PATH, "ab");
+ SkASSERT(f != NULL);
+ fwrite((const char*)fBlock + fBytesWritten, 1, bytes, f);
+ fclose(f);
+#endif
+
fStatus = fReader.playback((const char*)fBlock + fBytesWritten, bytes);
SkASSERT(SkGPipeReader::kError_Status != fStatus);
fBytesWritten += bytes;