aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-01-18 21:05:42 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-01-18 21:05:42 +0000
commitd4dfd10bb6f9bf3ac6e1ebc9bc3ae22c6d06321f (patch)
treece842e047ab2f267a6a913250035cb1c8410eaf1 /gm
parent2e7b43d33cc495663cb814a7a9d1ecdc09c31828 (diff)
add new 2nd argument for rendertarget to SkGpuCanvas
git-svn-id: http://skia.googlecode.com/svn/trunk@707 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r--gm/gmmain.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index e406c7955f..bafb60ff40 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -8,6 +8,7 @@
#include "GrContext.h"
#include "SkGpuCanvas.h"
+#include "SkGpuDevice.h"
#include "SkEGLContext.h"
#include "SkDevice.h"
@@ -26,7 +27,7 @@ public:
Iter() {
fReg = GMRegistry::Head();
}
-
+
GM* next() {
if (fReg) {
GMRegistry::Factory fact = fReg->factory();
@@ -35,7 +36,7 @@ public:
}
return NULL;
}
-
+
static int Count() {
const GMRegistry* reg = GMRegistry::Head();
int count = 0;
@@ -45,7 +46,7 @@ public:
}
return count;
}
-
+
private:
const GMRegistry* fReg;
};
@@ -192,7 +193,7 @@ static const struct {
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)
@@ -249,9 +250,9 @@ int main (int argc, char * const argv[]) {
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 {