blob: 8ba600b6ac84b1fffca9554aa956679a7ac5380a [file] [log] [blame]
halcanary5cd406f2015-09-23 12:46:24 -07001/*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7#include "Resources.h"
8#include "gm.h"
9// http://skbug.com/4374
10DEF_SIMPLE_GM(draw_bitmap_rect_skbug4734, canvas, 64, 64) {
11 SkBitmap source;
12 if (GetResourceAsBitmap("randPixels.png", &source)) {
13 SkRect rect = SkRect::Make(source.bounds());
14 rect.inset(0.5, 1.5);
15 SkRect dst;
16 SkMatrix::MakeScale(8.0f).mapRect(&dst, rect);
17 canvas->drawBitmapRect(source, rect, dst, nullptr);
18 }
19}