c465d13e6f
Should make it easier to ask just for images. Change-Id: If821743dc924c4bfbc6b2b2d29b14affde7b3afd Reviewed-on: https://skia-review.googlesource.com/82684 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
20 lines
584 B
C++
20 lines
584 B
C++
/*
|
|
* Copyright 2015 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
#include "Resources.h"
|
|
#include "gm.h"
|
|
// https://bug.skia.org/4374
|
|
DEF_SIMPLE_GM(draw_bitmap_rect_skbug4734, canvas, 64, 64) {
|
|
SkBitmap source;
|
|
if (GetResourceAsBitmap("images/randPixels.png", &source)) {
|
|
SkRect rect = SkRect::Make(source.bounds());
|
|
rect.inset(0.5, 1.5);
|
|
SkRect dst;
|
|
SkMatrix::MakeScale(8.0f).mapRect(&dst, rect);
|
|
canvas->drawBitmapRect(source, rect, dst, nullptr);
|
|
}
|
|
}
|