a6841be235
This fixes a large number of SkSL namespaces which were labeled as if they were anonymous, and also a handful of other mislabeled namespaces. Missing namespace-end comments have been added throughout. A number of diffs are just indentation-related (adjusting 1- or 3- space indents to 2-space). Change-Id: I6c62052a0d3aea4ae12ca07e0c2a8587b2fce4ec Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308503 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
/*
|
|
* Copyright 2011 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#include "gm/gm.h"
|
|
#include "include/core/SkBitmap.h"
|
|
#include "include/core/SkCanvas.h"
|
|
#include "include/core/SkColorPriv.h"
|
|
#include "include/core/SkPaint.h"
|
|
#include "include/core/SkShader.h"
|
|
#include "include/core/SkSize.h"
|
|
#include "include/core/SkString.h"
|
|
#include "include/core/SkTileMode.h"
|
|
|
|
namespace {
|
|
class TinyBitmapGM : public skiagm::GM {
|
|
void onOnceBeforeDraw() override { this->setBGColor(0xFFDDDDDD); }
|
|
|
|
SkString onShortName() override { return SkString("tinybitmap"); }
|
|
|
|
virtual SkISize onISize() override { return SkISize::Make(100, 100); }
|
|
|
|
void onDraw(SkCanvas* canvas) override {
|
|
SkBitmap bm;
|
|
bm.allocN32Pixels(1, 1);
|
|
*bm.getAddr32(0, 0) = SkPackARGB32(0x80, 0x80, 0, 0);
|
|
SkPaint paint;
|
|
paint.setAlphaf(0.5f);
|
|
paint.setShader(bm.makeShader(SkTileMode::kRepeat, SkTileMode::kMirror));
|
|
canvas->drawPaint(paint);
|
|
}
|
|
};
|
|
} // namespace
|
|
|
|
DEF_GM( return new TinyBitmapGM; )
|