GM for http://skbug.com/4374
BUG=skia:4374 Review URL: https://codereview.chromium.org/1367623002
This commit is contained in:
parent
f12a1673f0
commit
5cd406f0f6
19
gm/draw_bitmap_rect_skbug4374.cpp
Normal file
19
gm/draw_bitmap_rect_skbug4374.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* 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"
|
||||
// http://skbug.com/4374
|
||||
DEF_SIMPLE_GM(draw_bitmap_rect_skbug4734, canvas, 64, 64) {
|
||||
SkBitmap source;
|
||||
if (GetResourceAsBitmap("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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user