Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: gm/draw_bitmap_rect_skbug4374.cpp

Issue 1367623002: GM for http://skbug.com/4374 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-09-23 (Wednesday) 15:36:51 EDT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/draw_bitmap_rect_skbug4374.cpp
diff --git a/gm/draw_bitmap_rect_skbug4374.cpp b/gm/draw_bitmap_rect_skbug4374.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..8ba600b6ac84b1fffca9554aa956679a7ac5380a
--- /dev/null
+++ b/gm/draw_bitmap_rect_skbug4374.cpp
@@ -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);
+ }
+}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698