| OLD | NEW |
| 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/files/file_util.h" | 5 #include "base/files/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" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 void SetUpGLRenderer(bool use_skia_gpu_backend); | 58 void SetUpGLRenderer(bool use_skia_gpu_backend); |
| 59 void SetUpSoftwareRenderer(); | 59 void SetUpSoftwareRenderer(); |
| 60 | 60 |
| 61 void ForceExpandedViewport(const gfx::Size& surface_expansion); | 61 void ForceExpandedViewport(const gfx::Size& surface_expansion); |
| 62 void ForceViewportOffset(const gfx::Vector2d& viewport_offset); | 62 void ForceViewportOffset(const gfx::Vector2d& viewport_offset); |
| 63 void ForceDeviceClip(const gfx::Rect& clip); | 63 void ForceDeviceClip(const gfx::Rect& clip); |
| 64 void EnableExternalStencilTest(); | 64 void EnableExternalStencilTest(); |
| 65 | 65 |
| 66 // RendererClient implementation. | 66 // RendererClient implementation. |
| 67 virtual void SetFullRootLayerDamage() override {} | 67 void SetFullRootLayerDamage() override {} |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 void ReadbackResult(base::Closure quit_run_loop, | 70 void ReadbackResult(base::Closure quit_run_loop, |
| 71 scoped_ptr<CopyOutputResult> result); | 71 scoped_ptr<CopyOutputResult> result); |
| 72 | 72 |
| 73 bool PixelsMatchReference(const base::FilePath& ref_file, | 73 bool PixelsMatchReference(const base::FilePath& ref_file, |
| 74 const PixelComparator& comparator); | 74 const PixelComparator& comparator); |
| 75 | 75 |
| 76 scoped_ptr<gfx::DisableNullDrawGLBindings> enable_pixel_output_; | 76 scoped_ptr<gfx::DisableNullDrawGLBindings> enable_pixel_output_; |
| 77 }; | 77 }; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 SoftwareRendererWithExpandedViewport>::ExpandedViewport() const { | 184 SoftwareRendererWithExpandedViewport>::ExpandedViewport() const { |
| 185 return true; | 185 return true; |
| 186 } | 186 } |
| 187 | 187 |
| 188 typedef RendererPixelTest<GLRenderer> GLRendererPixelTest; | 188 typedef RendererPixelTest<GLRenderer> GLRendererPixelTest; |
| 189 typedef RendererPixelTest<SoftwareRenderer> SoftwareRendererPixelTest; | 189 typedef RendererPixelTest<SoftwareRenderer> SoftwareRendererPixelTest; |
| 190 | 190 |
| 191 } // namespace cc | 191 } // namespace cc |
| 192 | 192 |
| 193 #endif // CC_TEST_PIXEL_TEST_H_ | 193 #endif // CC_TEST_PIXEL_TEST_H_ |
| OLD | NEW |