| 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 { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 PixelTestOutputSurface::PixelTestOutputSurface( | 22 PixelTestOutputSurface::PixelTestOutputSurface( |
| 23 scoped_refptr<ContextProvider> context_provider, | 23 scoped_refptr<ContextProvider> context_provider, |
| 24 bool flipped_output_surface) | 24 bool flipped_output_surface) |
| 25 : PixelTestOutputSurface(context_provider, | 25 : PixelTestOutputSurface(context_provider, |
| 26 nullptr, | 26 nullptr, |
| 27 flipped_output_surface) { | 27 flipped_output_surface) { |
| 28 } | 28 } |
| 29 | 29 |
| 30 PixelTestOutputSurface::PixelTestOutputSurface( | 30 PixelTestOutputSurface::PixelTestOutputSurface( |
| 31 scoped_ptr<SoftwareOutputDevice> software_device) | 31 std::unique_ptr<SoftwareOutputDevice> software_device) |
| 32 : OutputSurface(std::move(software_device)), | 32 : OutputSurface(std::move(software_device)), |
| 33 external_stencil_test_(false) {} | 33 external_stencil_test_(false) {} |
| 34 | 34 |
| 35 void PixelTestOutputSurface::Reshape(const gfx::Size& size, | 35 void PixelTestOutputSurface::Reshape(const gfx::Size& size, |
| 36 float scale_factor, | 36 float scale_factor, |
| 37 bool has_alpha) { | 37 bool has_alpha) { |
| 38 gfx::Size expanded_size(size.width() + surface_expansion_size_.width(), | 38 gfx::Size expanded_size(size.width() + surface_expansion_size_.width(), |
| 39 size.height() + surface_expansion_size_.height()); | 39 size.height() + surface_expansion_size_.height()); |
| 40 OutputSurface::Reshape(expanded_size, scale_factor, has_alpha); | 40 OutputSurface::Reshape(expanded_size, scale_factor, has_alpha); |
| 41 } | 41 } |
| 42 | 42 |
| 43 bool PixelTestOutputSurface::HasExternalStencilTest() const { | 43 bool PixelTestOutputSurface::HasExternalStencilTest() const { |
| 44 return external_stencil_test_; | 44 return external_stencil_test_; |
| 45 } | 45 } |
| 46 | 46 |
| 47 void PixelTestOutputSurface::SwapBuffers(CompositorFrame* frame) { | 47 void PixelTestOutputSurface::SwapBuffers(CompositorFrame* frame) { |
| 48 PostSwapBuffersComplete(); | 48 PostSwapBuffersComplete(); |
| 49 client_->DidSwapBuffers(); | 49 client_->DidSwapBuffers(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 } // namespace cc | 52 } // namespace cc |
| OLD | NEW |