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

Unified Diff: tools/Checkerboard.cpp

Issue 873333004: s/sk_tools::DrawCheckerboard/sk_tool_utils::draw_checkerboard/ (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | « tools/Checkerboard.h ('k') | tools/sk_tool_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/Checkerboard.cpp
diff --git a/tools/Checkerboard.cpp b/tools/Checkerboard.cpp
deleted file mode 100644
index 80de125f1569f87c114df4e54e082f4f408a84be..0000000000000000000000000000000000000000
--- a/tools/Checkerboard.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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 "Checkerboard.h"
-#include "SkCanvas.h"
-#include "SkShader.h"
-
-SkShader* sk_tools::CreateCheckerboardShader(
- SkColor c1, SkColor c2, int size) {
- SkBitmap bm;
- bm.allocN32Pixels(2 * size, 2 * size);
- bm.eraseColor(c1);
- bm.eraseArea(SkIRect::MakeLTRB(0, 0, size, size), c2);
- bm.eraseArea(SkIRect::MakeLTRB(size, size, 2 * size, 2 * size), c2);
- return SkShader::CreateBitmapShader(
- bm, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);
-}
-
-void sk_tools::DrawCheckerboard(SkCanvas* canvas,
- SkColor c1, SkColor c2, int size) {
- SkPaint paint;
- paint.setShader(CreateCheckerboardShader(c1, c2, size))->unref();
- canvas->drawPaint(paint);
-}
« no previous file with comments | « tools/Checkerboard.h ('k') | tools/sk_tool_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698