2015-09-23 19:46:24 +00:00
|
|
|
/*
|
|
|
|
* 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"
|
2015-11-07 13:29:00 +00:00
|
|
|
// https://bug.skia.org/4374
|
2015-09-23 19:46:24 +00:00
|
|
|
DEF_SIMPLE_GM(draw_bitmap_rect_skbug4734, canvas, 64, 64) {
|
|
|
|
SkBitmap source;
|
2017-12-08 15:21:31 +00:00
|
|
|
if (GetResourceAsBitmap("images/randPixels.png", &source)) {
|
2015-09-23 19:46:24 +00:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|