skia2/gm/make_raster_image.cpp
Hal Canary 7c70143055 GMs: re-sort gni, script to regenerate gni, file name convention
Change-Id: I4b61c2a66f8d6b2d8c4a5ffd8c373b643415c70c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211598
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-05-02 20:08:37 +00:00

19 lines
479 B
C++

/*
* Copyright 2018 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "gm/gm.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkImage.h"
#include "include/core/SkRefCnt.h"
#include "tools/Resources.h"
DEF_SIMPLE_GM(makeRasterImage, canvas, 128,128) {
if (auto img = GetResourceAsImage("images/color_wheel.png")) {
canvas->drawImage(img->makeRasterImage(), 0,0);
}
}