Fix a type mismatch on Windows caused by r201738.
[chromium-blink-merge.git] / cc / test / layer_tree_pixel_test.h
blob1e5ddae1b29198160cb47fbf983951a4fa7a3dd1
1 // Copyright 2013 The Chromium 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.
5 #include "base/files/file_path.h"
6 #include "base/memory/ref_counted.h"
7 #include "base/memory/scoped_ptr.h"
8 #include "cc/layers/solid_color_layer.h"
9 #include "cc/test/layer_tree_test.h"
11 #ifndef CC_TEST_LAYER_TREE_PIXEL_TEST_H_
12 #define CC_TEST_LAYER_TREE_PIXEL_TEST_H_
14 namespace cc {
15 class LayerTreeHost;
16 class PixelComparator;
18 class LayerTreePixelTest : public LayerTreeTest {
19 protected:
20 LayerTreePixelTest();
21 virtual ~LayerTreePixelTest();
23 virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE;
24 virtual scoped_refptr<cc::ContextProvider>
25 OffscreenContextProviderForMainThread() OVERRIDE;
26 virtual scoped_refptr<cc::ContextProvider>
27 OffscreenContextProviderForCompositorThread() OVERRIDE;
29 void ReadbackResult(scoped_ptr<SkBitmap> bitmap);
31 virtual void BeginTest() OVERRIDE;
32 virtual void SetupTree() OVERRIDE;
33 virtual void AfterTest() OVERRIDE;
35 scoped_refptr<SolidColorLayer> CreateSolidColorLayer(gfx::Rect rect,
36 SkColor color);
37 scoped_refptr<SolidColorLayer> CreateSolidColorLayerWithBorder(
38 gfx::Rect rect,
39 SkColor color,
40 int border_width,
41 SkColor border_color);
43 void RunPixelTest(scoped_refptr<Layer> content_root,
44 base::FilePath file_name);
46 void RunPixelTestWithReadbackTarget(scoped_refptr<Layer> content_root,
47 Layer* target,
48 base::FilePath file_name);
50 // Common CSS colors defined for tests to use.
51 enum Colors {
52 kCSSOrange = 0xffffa500,
53 kCSSBrown = 0xffa52a2a,
54 kCSSGreen = 0xff008000,
57 scoped_ptr<PixelComparator> pixel_comparator_;
59 private:
60 scoped_refptr<Layer> content_root_;
61 Layer* readback_target_;
62 base::FilePath ref_file_;
65 } // namespace cc
67 #endif // CC_TEST_LAYER_TREE_PIXEL_TEST_H_