2014-11-25 03:11:48 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2014 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "gm.h"
|
|
|
|
#include "sk_types.h"
|
|
|
|
|
|
|
|
extern "C" void sk_test_c_api(sk_canvas_t*);
|
|
|
|
|
|
|
|
class C_GM : public skiagm::GM {
|
|
|
|
public:
|
|
|
|
C_GM() {}
|
|
|
|
|
|
|
|
protected:
|
2015-03-26 01:17:31 +00:00
|
|
|
SkString onShortName() override {
|
2014-11-25 03:11:48 +00:00
|
|
|
return SkString("c_gms");
|
|
|
|
}
|
|
|
|
|
2015-03-26 01:17:31 +00:00
|
|
|
SkISize onISize() override {
|
2014-11-25 03:11:48 +00:00
|
|
|
return SkISize::Make(640, 480);
|
|
|
|
}
|
|
|
|
|
2015-03-26 01:17:31 +00:00
|
|
|
void onDraw(SkCanvas* canvas) override {
|
2014-11-25 03:11:48 +00:00
|
|
|
sk_test_c_api((sk_canvas_t*)canvas);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
typedef GM INHERITED;
|
|
|
|
};
|
|
|
|
|
|
|
|
DEF_GM( return new C_GM; )
|
|
|
|
|