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/surfaces/surface_aggregator.h" | 5 #include "cc/surfaces/surface_aggregator.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 gfx::Size SurfaceSize() { | 45 gfx::Size SurfaceSize() { |
46 static gfx::Size size(100, 100); | 46 static gfx::Size size(100, 100); |
47 return size; | 47 return size; |
48 } | 48 } |
49 | 49 |
50 class EmptySurfaceFactoryClient : public SurfaceFactoryClient { | 50 class EmptySurfaceFactoryClient : public SurfaceFactoryClient { |
51 public: | 51 public: |
52 void ReturnResources(const ReturnedResourceArray& resources) override {} | 52 void ReturnResources(const ReturnedResourceArray& resources) override {} |
53 | 53 |
54 void WillDrawSurface(SurfaceId id, const gfx::Rect& damage_rect) override { | 54 void WillDrawSurface(const SurfaceId& id, |
| 55 const gfx::Rect& damage_rect) override { |
55 last_surface_id_ = id; | 56 last_surface_id_ = id; |
56 last_damage_rect_ = damage_rect; | 57 last_damage_rect_ = damage_rect; |
57 } | 58 } |
58 | 59 |
59 void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override {} | 60 void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override {} |
60 | 61 |
61 gfx::Rect last_damage_rect_; | 62 gfx::Rect last_damage_rect_; |
62 SurfaceId last_surface_id_; | 63 SurfaceId last_surface_id_; |
63 }; | 64 }; |
64 | 65 |
(...skipping 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2173 // Output is insecure, so texture should be drawn. | 2174 // Output is insecure, so texture should be drawn. |
2174 EXPECT_EQ(DrawQuad::SOLID_COLOR, render_pass->quad_list.back()->material); | 2175 EXPECT_EQ(DrawQuad::SOLID_COLOR, render_pass->quad_list.back()->material); |
2175 | 2176 |
2176 factory.Destroy(surface1_id); | 2177 factory.Destroy(surface1_id); |
2177 factory.Destroy(surface2_id); | 2178 factory.Destroy(surface2_id); |
2178 } | 2179 } |
2179 | 2180 |
2180 } // namespace | 2181 } // namespace |
2181 } // namespace cc | 2182 } // namespace cc |
2182 | 2183 |
OLD | NEW |