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

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

Issue 171363008: cc: Make cc_unittests opt into real GL NullDraw contexts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nulldraw-cc: reviewed Created 6 years, 10 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.h ('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/output/gl_renderer.h" 6 #include "cc/output/gl_renderer.h"
7 #include "cc/output/software_renderer.h" 7 #include "cc/output/software_renderer.h"
8 #include "cc/quads/render_pass.h" 8 #include "cc/quads/render_pass.h"
9 #include "cc/test/pixel_comparator.h" 9 #include "cc/test/pixel_comparator.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "ui/gfx/size.h" 11 #include "ui/gfx/size.h"
12 #include "ui/gl/gl_implementation.h"
12 13
13 #ifndef CC_TEST_PIXEL_TEST_H_ 14 #ifndef CC_TEST_PIXEL_TEST_H_
14 #define CC_TEST_PIXEL_TEST_H_ 15 #define CC_TEST_PIXEL_TEST_H_
15 16
16 namespace cc { 17 namespace cc {
17 class CopyOutputResult; 18 class CopyOutputResult;
18 class DirectRenderer; 19 class DirectRenderer;
19 class FakeOutputSurfaceClient; 20 class FakeOutputSurfaceClient;
20 class OutputSurface; 21 class OutputSurface;
21 class ResourceProvider; 22 class ResourceProvider;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 67
67 // RendererClient implementation. 68 // RendererClient implementation.
68 virtual void SetFullRootLayerDamage() OVERRIDE {} 69 virtual void SetFullRootLayerDamage() OVERRIDE {}
69 70
70 private: 71 private:
71 void ReadbackResult(base::Closure quit_run_loop, 72 void ReadbackResult(base::Closure quit_run_loop,
72 scoped_ptr<CopyOutputResult> result); 73 scoped_ptr<CopyOutputResult> result);
73 74
74 bool PixelsMatchReference(const base::FilePath& ref_file, 75 bool PixelsMatchReference(const base::FilePath& ref_file,
75 const PixelComparator& comparator); 76 const PixelComparator& comparator);
77
78 scoped_ptr<gfx::DisableNullDrawGLBindings> enable_pixel_output_;
76 }; 79 };
77 80
78 template<typename RendererType> 81 template<typename RendererType>
79 class RendererPixelTest : public PixelTest { 82 class RendererPixelTest : public PixelTest {
80 public: 83 public:
81 RendererType* renderer() { 84 RendererType* renderer() {
82 return static_cast<RendererType*>(renderer_.get()); 85 return static_cast<RendererType*>(renderer_.get());
83 } 86 }
84 87
85 bool UseSkiaGPUBackend() const; 88 bool UseSkiaGPUBackend() const;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 SoftwareRendererWithExpandedViewport>::ExpandedViewport() const { 186 SoftwareRendererWithExpandedViewport>::ExpandedViewport() const {
184 return true; 187 return true;
185 } 188 }
186 189
187 typedef RendererPixelTest<GLRenderer> GLRendererPixelTest; 190 typedef RendererPixelTest<GLRenderer> GLRendererPixelTest;
188 typedef RendererPixelTest<SoftwareRenderer> SoftwareRendererPixelTest; 191 typedef RendererPixelTest<SoftwareRenderer> SoftwareRendererPixelTest;
189 192
190 } // namespace cc 193 } // namespace cc
191 194
192 #endif // CC_TEST_PIXEL_TEST_H_ 195 #endif // CC_TEST_PIXEL_TEST_H_
OLDNEW
« no previous file with comments | « cc/test/layer_tree_pixel_test.h ('k') | cc/test/pixel_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698