| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef CC_TEST_FAKE_OUTPUT_SURFACE_H_ | 5 #ifndef CC_TEST_FAKE_OUTPUT_SURFACE_H_ |
| 6 #define CC_TEST_FAKE_OUTPUT_SURFACE_H_ | 6 #define CC_TEST_FAKE_OUTPUT_SURFACE_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" |
| 11 #include "cc/output/output_surface.h" | 11 #include "cc/output/output_surface.h" |
| 12 #include "cc/output/software_output_device.h" | 12 #include "cc/output/software_output_device.h" |
| 13 #include "cc/test/test_web_graphics_context_3d.h" | 13 #include "cc/test/test_web_graphics_context_3d.h" |
| 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 14 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
| 15 | 15 |
| 16 namespace cc { | 16 namespace cc { |
| 17 | 17 |
| 18 class FakeOutputSurface : public OutputSurface { | 18 class FakeOutputSurface : public OutputSurface { |
| 19 public: | 19 public: |
| 20 virtual ~FakeOutputSurface(); | 20 virtual ~FakeOutputSurface(); |
| 21 | 21 |
| 22 static scoped_ptr<FakeOutputSurface> Create3d( | 22 static scoped_ptr<FakeOutputSurface> Create3d( |
| 23 scoped_ptr<WebKit::WebGraphicsContext3D> context3d) { | 23 scoped_ptr<WebKit::WebGraphicsContext3D> context3d) { |
| 24 return make_scoped_ptr(new FakeOutputSurface(context3d.Pass(), false)); | 24 return make_scoped_ptr(new FakeOutputSurface(context3d.Pass(), false)); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 static inline scoped_ptr<cc::OutputSurface> CreateFakeOutputSurface() { | 102 static inline scoped_ptr<cc::OutputSurface> CreateFakeOutputSurface() { |
| 103 return FakeOutputSurface::Create3d( | 103 return FakeOutputSurface::Create3d( |
| 104 TestWebGraphicsContext3D::Create( | 104 TestWebGraphicsContext3D::Create( |
| 105 WebKit::WebGraphicsContext3D::Attributes()) | 105 WebKit::WebGraphicsContext3D::Attributes()) |
| 106 .PassAs<WebKit::WebGraphicsContext3D>()).PassAs<cc::OutputSurface>(); | 106 .PassAs<WebKit::WebGraphicsContext3D>()).PassAs<cc::OutputSurface>(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace cc | 109 } // namespace cc |
| 110 | 110 |
| 111 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ | 111 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ |
| OLD | NEW |