OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/output/compositor_frame.h" | 5 #include "cc/output/compositor_frame.h" |
6 #include "cc/output/delegated_frame_data.h" | 6 #include "cc/output/delegated_frame_data.h" |
7 #include "cc/surfaces/surface.h" | 7 #include "cc/surfaces/surface.h" |
8 #include "cc/surfaces/surface_factory.h" | 8 #include "cc/surfaces/surface_factory.h" |
9 #include "cc/surfaces/surface_factory_client.h" | 9 #include "cc/surfaces/surface_factory_client.h" |
10 #include "cc/surfaces/surface_manager.h" | 10 #include "cc/surfaces/surface_manager.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "ui/gfx/size.h" | 12 #include "ui/gfx/size.h" |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 namespace { | 15 namespace { |
16 | 16 |
17 class TestSurfaceFactoryClient : public SurfaceFactoryClient { | 17 class TestSurfaceFactoryClient : public SurfaceFactoryClient { |
18 public: | 18 public: |
19 TestSurfaceFactoryClient() {} | 19 TestSurfaceFactoryClient() {} |
20 virtual ~TestSurfaceFactoryClient() {} | 20 virtual ~TestSurfaceFactoryClient() {} |
21 | 21 |
22 virtual void ReturnResources( | 22 virtual void ReturnResources( |
23 const ReturnedResourceArray& resources) OVERRIDE { | 23 const ReturnedResourceArray& resources) override { |
24 returned_resources_.insert( | 24 returned_resources_.insert( |
25 returned_resources_.end(), resources.begin(), resources.end()); | 25 returned_resources_.end(), resources.begin(), resources.end()); |
26 } | 26 } |
27 | 27 |
28 const ReturnedResourceArray& returned_resources() const { | 28 const ReturnedResourceArray& returned_resources() const { |
29 return returned_resources_; | 29 return returned_resources_; |
30 } | 30 } |
31 | 31 |
32 void clear_returned_resources() { returned_resources_.clear(); } | 32 void clear_returned_resources() { returned_resources_.clear(); } |
33 | 33 |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 resource.id = 1; | 367 resource.id = 1; |
368 resource.mailbox_holder.texture_target = GL_TEXTURE_2D; | 368 resource.mailbox_holder.texture_target = GL_TEXTURE_2D; |
369 frame_data->resource_list.push_back(resource); | 369 frame_data->resource_list.push_back(resource); |
370 scoped_ptr<CompositorFrame> frame(new CompositorFrame); | 370 scoped_ptr<CompositorFrame> frame(new CompositorFrame); |
371 frame->delegated_frame_data = frame_data.Pass(); | 371 frame->delegated_frame_data = frame_data.Pass(); |
372 factory_.SubmitFrame(id, frame.Pass(), base::Closure()); | 372 factory_.SubmitFrame(id, frame.Pass(), base::Closure()); |
373 } | 373 } |
374 | 374 |
375 } // namespace | 375 } // namespace |
376 } // namespace cc | 376 } // namespace cc |
OLD | NEW |