aboutsummaryrefslogtreecommitdiff
path: root/samplecode/SampleTextAlpha.cpp
diff options
context:
space:
mode:
authorreed <reed@google.com>2014-06-30 09:05:34 -0700
committerCommit bot <commit-bot@chromium.org>2014-06-30 09:05:34 -0700
commit52d9ac6c92ddf33b3b05eb77ba9509a7aa441657 (patch)
treef9ceeceda78cb8e92ba4e8ac57b5fb680c85d576 /samplecode/SampleTextAlpha.cpp
parentf3d15dc13abb825946ccad514412699828d5d709 (diff)
stop calling SkCanvas::getDevice
BUG=skia: R=bsalomon@google.com, robertphillips@google.com, junov@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/355193006
Diffstat (limited to 'samplecode/SampleTextAlpha.cpp')
-rw-r--r--samplecode/SampleTextAlpha.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/samplecode/SampleTextAlpha.cpp b/samplecode/SampleTextAlpha.cpp
index fcef92f315..3f4e0dbba9 100644
--- a/samplecode/SampleTextAlpha.cpp
+++ b/samplecode/SampleTextAlpha.cpp
@@ -28,22 +28,6 @@
#include "SkOSFile.h"
#include "SkStream.h"
-static void check_for_nonwhite(const SkBitmap& bm, int alpha) {
- if (bm.colorType() != kRGB_565_SkColorType) {
- return;
- }
-
- for (int y = 0; y < bm.height(); y++) {
- for (int x = 0; x < bm.width(); x++) {
- uint16_t c = *bm.getAddr16(x, y);
- if (c != 0xFFFF) {
- SkDebugf("------ nonwhite alpha=%x [%d %d] %x\n", alpha, x, y, c);
- return;
- }
- }
- }
-}
-
class TextAlphaView : public SampleView {
public:
TextAlphaView() {
@@ -83,16 +67,6 @@ protected:
canvas->drawText(str, strlen(str), x, y, paint);
y += paint.getFontMetrics(NULL);
}
- if (false) { // avoid bit rot, suppress warning
- check_for_nonwhite(canvas->getDevice()->accessBitmap(false), fByte);
- SkDebugf("------ byte %x\n", fByte);
- }
-
- if (false) {
- fByte += 1;
- fByte &= 0xFF;
- this->inval(NULL);
- }
}
virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) SK_OVERRIDE {