Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1037)

Side by Side Diff: cc/test/pixel_test.h

Issue 15004009: cc: Fix readback from non-root layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/test/layer_tree_pixel_test.cc ('k') | cc/test/pixel_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/file_util.h" 5 #include "base/file_util.h"
6 #include "cc/quads/render_pass.h" 6 #include "cc/quads/render_pass.h"
7 #include "cc/test/pixel_comparator.h" 7 #include "cc/test/pixel_comparator.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "ui/gfx/size.h" 9 #include "ui/gfx/size.h"
10 10
11 #ifndef CC_TEST_PIXEL_TEST_H_ 11 #ifndef CC_TEST_PIXEL_TEST_H_
12 #define CC_TEST_PIXEL_TEST_H_ 12 #define CC_TEST_PIXEL_TEST_H_
13 13
14 namespace cc { 14 namespace cc {
15 class DirectRenderer; 15 class DirectRenderer;
16 class GLRenderer; 16 class GLRenderer;
17 class SoftwareRenderer; 17 class SoftwareRenderer;
18 class OutputSurface; 18 class OutputSurface;
19 class ResourceProvider; 19 class ResourceProvider;
20 20
21 class PixelTest : public testing::Test { 21 class PixelTest : public testing::Test {
22 protected: 22 protected:
23 PixelTest(); 23 PixelTest();
24 virtual ~PixelTest(); 24 virtual ~PixelTest();
25 25
26 bool RunPixelTest(RenderPassList* pass_list, 26 bool RunPixelTest(RenderPassList* pass_list,
27 const base::FilePath& ref_file, 27 const base::FilePath& ref_file,
28 const PixelComparator& comparator); 28 const PixelComparator& comparator);
29 29
30 bool RunPixelTestWithReadbackTarget(RenderPassList* pass_list,
31 RenderPass* target,
32 const base::FilePath& ref_file,
33 const PixelComparator& comparator);
34
30 gfx::Size device_viewport_size_; 35 gfx::Size device_viewport_size_;
31 scoped_ptr<OutputSurface> output_surface_; 36 scoped_ptr<OutputSurface> output_surface_;
32 scoped_ptr<ResourceProvider> resource_provider_; 37 scoped_ptr<ResourceProvider> resource_provider_;
33 class PixelTestRendererClient; 38 class PixelTestRendererClient;
34 scoped_ptr<PixelTestRendererClient> fake_client_; 39 scoped_ptr<PixelTestRendererClient> fake_client_;
35 scoped_ptr<DirectRenderer> renderer_; 40 scoped_ptr<DirectRenderer> renderer_;
36 scoped_ptr<SkBitmap> result_bitmap_; 41 scoped_ptr<SkBitmap> result_bitmap_;
37 42
38 void SetUpGLRenderer(); 43 void SetUpGLRenderer();
39 void SetUpSoftwareRenderer(); 44 void SetUpSoftwareRenderer();
(...skipping 25 matching lines...) Expand all
65 inline void RendererPixelTest<SoftwareRenderer>::SetUp() { 70 inline void RendererPixelTest<SoftwareRenderer>::SetUp() {
66 SetUpSoftwareRenderer(); 71 SetUpSoftwareRenderer();
67 } 72 }
68 73
69 typedef RendererPixelTest<GLRenderer> GLRendererPixelTest; 74 typedef RendererPixelTest<GLRenderer> GLRendererPixelTest;
70 typedef RendererPixelTest<SoftwareRenderer> SoftwareRendererPixelTest; 75 typedef RendererPixelTest<SoftwareRenderer> SoftwareRendererPixelTest;
71 76
72 } // namespace cc 77 } // namespace cc
73 78
74 #endif // CC_TEST_PIXEL_TEST_H_ 79 #endif // CC_TEST_PIXEL_TEST_H_
OLDNEW
« no previous file with comments | « cc/test/layer_tree_pixel_test.cc ('k') | cc/test/pixel_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698