| Index: cc/test/test_skcanvas.cc
|
| diff --git a/cc/test/test_skcanvas.cc b/cc/test/test_skcanvas.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e45f42de45b109888f2f2c959d9546f58a462414
|
| --- /dev/null
|
| +++ b/cc/test/test_skcanvas.cc
|
| @@ -0,0 +1,26 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "cc/test/test_skcanvas.h"
|
| +
|
| +namespace cc {
|
| +
|
| +SaveCountingCanvas::SaveCountingCanvas() : SkNoDrawCanvas(100, 100) {}
|
| +
|
| +SkCanvas::SaveLayerStrategy SaveCountingCanvas::getSaveLayerStrategy(
|
| + const SaveLayerRec& rec) {
|
| + save_count_++;
|
| + return SkNoDrawCanvas::getSaveLayerStrategy(rec);
|
| +}
|
| +
|
| +void SaveCountingCanvas::willRestore() {
|
| + restore_count_++;
|
| +}
|
| +
|
| +void SaveCountingCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) {
|
| + draw_rect_ = rect;
|
| + paint_ = paint;
|
| +}
|
| +
|
| +} // namespace cc
|
|
|