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 2063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2128 // Output is insecure, so texture should be drawn. | 2129 // Output is insecure, so texture should be drawn. |
2129 EXPECT_EQ(DrawQuad::SOLID_COLOR, render_pass->quad_list.back()->material); | 2130 EXPECT_EQ(DrawQuad::SOLID_COLOR, render_pass->quad_list.back()->material); |
2130 | 2131 |
2131 factory.Destroy(surface1_id); | 2132 factory.Destroy(surface1_id); |
2132 factory.Destroy(surface2_id); | 2133 factory.Destroy(surface2_id); |
2133 } | 2134 } |
2134 | 2135 |
2135 } // namespace | 2136 } // namespace |
2136 } // namespace cc | 2137 } // namespace cc |
2137 | 2138 |
OLD | NEW |