Flutter Engine
 
Loading...
Searching...
No Matches
canvas_test.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_TESTING_CANVAS_TEST_H_
6#define FLUTTER_TESTING_CANVAS_TEST_H_
7
9#include "gtest/gtest.h"
10#include "third_party/skia/include/core/SkColorSpace.h"
11
12namespace flutter::testing {
13
14// This fixture allows creating tests that make use of a mock |SkCanvas|.
15template <typename BaseT>
16class CanvasTestBase : public BaseT {
17 public:
18 CanvasTestBase() = default;
19
20 sk_sp<SkColorSpace> mock_color_space() { return color_space_; }
21
22 private:
23 sk_sp<SkColorSpace> color_space_ = SkColorSpace::MakeSRGB();
24
26};
28
29} // namespace flutter::testing
30
31#endif // FLUTTER_TESTING_CANVAS_TEST_H_
sk_sp< SkColorSpace > mock_color_space()
Definition canvas_test.h:20
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27