#include "GrContext.h"
#include "SkGpuCanvas.h"
+#include "SkGpuDevice.h"
#include "SkEGLContext.h"
#include "SkDevice.h"
Iter() {
fReg = GMRegistry::Head();
}
-
+
GM* next() {
if (fReg) {
GMRegistry::Factory fact = fReg->factory();
}
return NULL;
}
-
+
static int Count() {
const GMRegistry* reg = GMRegistry::Head();
int count = 0;
}
return count;
}
-
+
private:
const GMRegistry* fReg;
};
int main (int argc, char * const argv[]) {
SkAutoGraphics ag;
-
+
const char* writePath = NULL; // if non-null, where we write the originals
const char* readPath = NULL; // if non-null, were we read from to compare
const char* diffPath = NULL; // if non-null, where we write our diffs (from compare)
if (NULL == context) {
continue;
}
- SkGpuCanvas gc(context);
+ SkGpuCanvas gc(context, SkGpuDevice::Current3DApiRenderTarget());
gc.setDevice(gc.createDevice(bitmap.config(), bitmap.width(), bitmap.height(),
- bitmap.isOpaque(), false))->unref();
+ bitmap.isOpaque(), false))->unref();
gm->draw(&gc);
gc.readPixels(&bitmap); // overwrite our previous allocation
} else {