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

Side by Side Diff: content/public/test/test_synchronous_compositor_android.cc

Issue 2188943002: Remove OutputSurfaceClient external clip (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unittests compile Created 4 years, 4 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
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 "content/public/test/test_synchronous_compositor_android.h" 5 #include "content/public/test/test_synchronous_compositor_android.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 TestSynchronousCompositor::TestSynchronousCompositor(int process_id, 13 TestSynchronousCompositor::TestSynchronousCompositor(int process_id,
14 int routing_id) 14 int routing_id)
15 : client_(NULL), process_id_(process_id), routing_id_(routing_id) {} 15 : client_(NULL), process_id_(process_id), routing_id_(routing_id) {}
16 16
17 TestSynchronousCompositor::~TestSynchronousCompositor() { 17 TestSynchronousCompositor::~TestSynchronousCompositor() {
18 SetClient(NULL); 18 SetClient(NULL);
19 } 19 }
20 20
21 void TestSynchronousCompositor::SetClient(SynchronousCompositorClient* client) { 21 void TestSynchronousCompositor::SetClient(SynchronousCompositorClient* client) {
22 if (client_) 22 if (client_)
23 client_->DidDestroyCompositor(this, process_id_, routing_id_); 23 client_->DidDestroyCompositor(this, process_id_, routing_id_);
24 client_ = client; 24 client_ = client;
25 if (client_) 25 if (client_)
26 client_->DidInitializeCompositor(this, process_id_, routing_id_); 26 client_->DidInitializeCompositor(this, process_id_, routing_id_);
27 } 27 }
28 28
29 SynchronousCompositor::Frame TestSynchronousCompositor::DemandDrawHw( 29 SynchronousCompositor::Frame TestSynchronousCompositor::DemandDrawHw(
30 const gfx::Size& surface_size,
31 const gfx::Transform& transform,
32 const gfx::Rect& viewport, 30 const gfx::Rect& viewport,
33 const gfx::Rect& clip,
34 const gfx::Rect& viewport_rect_for_tile_priority, 31 const gfx::Rect& viewport_rect_for_tile_priority,
35 const gfx::Transform& transform_for_tile_priority) { 32 const gfx::Transform& transform_for_tile_priority) {
36 return std::move(hardware_frame_); 33 return std::move(hardware_frame_);
37 } 34 }
38 35
39 void TestSynchronousCompositor::ReturnResources( 36 void TestSynchronousCompositor::ReturnResources(
40 uint32_t output_surface_id, 37 uint32_t output_surface_id,
41 const cc::ReturnedResourceArray& resources) { 38 const cc::ReturnedResourceArray& resources) {
42 ReturnedResources returned_resources; 39 ReturnedResources returned_resources;
43 returned_resources.output_surface_id = output_surface_id; 40 returned_resources.output_surface_id = output_surface_id;
(...skipping 20 matching lines...) Expand all
64 61
65 TestSynchronousCompositor::ReturnedResources::ReturnedResources() 62 TestSynchronousCompositor::ReturnedResources::ReturnedResources()
66 : output_surface_id(0u) {} 63 : output_surface_id(0u) {}
67 64
68 TestSynchronousCompositor::ReturnedResources::ReturnedResources( 65 TestSynchronousCompositor::ReturnedResources::ReturnedResources(
69 const ReturnedResources& other) = default; 66 const ReturnedResources& other) = default;
70 67
71 TestSynchronousCompositor::ReturnedResources::~ReturnedResources() {} 68 TestSynchronousCompositor::ReturnedResources::~ReturnedResources() {}
72 69
73 } // namespace content 70 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698