Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: cc/surfaces/surface_aggregator_unittest.cc

Issue 2102123002: Make Satisfy/Require callbacks pass Surface id and sequence by reference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/surface_layer_unittest.cc ('k') | cc/surfaces/surface_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/layers/surface_layer_unittest.cc ('k') | cc/surfaces/surface_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698