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 "cc/test/pixel_test_output_surface.h" | 5 #include "cc/test/pixel_test_output_surface.h" |
6 | 6 |
7 #include "cc/output/output_surface_client.h" | 7 #include "cc/output/output_surface_client.h" |
8 #include "ui/gfx/transform.h" | 8 #include "ui/gfx/transform.h" |
9 | 9 |
10 namespace cc { | 10 namespace cc { |
11 | 11 |
12 PixelTestOutputSurface::PixelTestOutputSurface( | 12 PixelTestOutputSurface::PixelTestOutputSurface( |
13 scoped_refptr<ContextProvider> context_provider) | 13 scoped_refptr<ContextProvider> context_provider) |
14 : OutputSurface(context_provider), external_stencil_test_(false) {} | 14 : OutputSurface(context_provider), external_stencil_test_(false) {} |
15 | 15 |
16 PixelTestOutputSurface::PixelTestOutputSurface( | 16 PixelTestOutputSurface::PixelTestOutputSurface( |
17 scoped_ptr<SoftwareOutputDevice> software_device) | 17 scoped_ptr<SoftwareOutputDevice> software_device) |
18 : OutputSurface(software_device.Pass()), external_stencil_test_(false) {} | 18 : OutputSurface(software_device.Pass()), external_stencil_test_(false) {} |
19 | 19 |
20 void PixelTestOutputSurface::Reshape(gfx::Size size, float scale_factor) { | 20 void PixelTestOutputSurface::Reshape(const gfx::Size& size, |
| 21 float scale_factor) { |
21 gfx::Size expanded_size(size.width() + surface_expansion_size_.width(), | 22 gfx::Size expanded_size(size.width() + surface_expansion_size_.width(), |
22 size.height() + surface_expansion_size_.height()); | 23 size.height() + surface_expansion_size_.height()); |
23 OutputSurface::Reshape(expanded_size, scale_factor); | 24 OutputSurface::Reshape(expanded_size, scale_factor); |
24 } | 25 } |
25 | 26 |
26 bool PixelTestOutputSurface::HasExternalStencilTest() const { | 27 bool PixelTestOutputSurface::HasExternalStencilTest() const { |
27 return external_stencil_test_; | 28 return external_stencil_test_; |
28 } | 29 } |
29 | 30 |
30 } // namespace cc | 31 } // namespace cc |
OLD | NEW |