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

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

Issue 1417893006: sync compositor: pass simple gfx types by const ref (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 TestSynchronousCompositor::TestSynchronousCompositor() : client_(NULL) { 11 TestSynchronousCompositor::TestSynchronousCompositor() : client_(NULL) {
12 } 12 }
13 13
14 TestSynchronousCompositor::~TestSynchronousCompositor() { 14 TestSynchronousCompositor::~TestSynchronousCompositor() {
15 SetClient(NULL); 15 SetClient(NULL);
16 } 16 }
17 17
18 void TestSynchronousCompositor::SetClient(SynchronousCompositorClient* client) { 18 void TestSynchronousCompositor::SetClient(SynchronousCompositorClient* client) {
19 if (client_) 19 if (client_)
20 client_->DidDestroyCompositor(this); 20 client_->DidDestroyCompositor(this);
21 client_ = client; 21 client_ = client;
22 if (client_) 22 if (client_)
23 client_->DidInitializeCompositor(this); 23 client_->DidInitializeCompositor(this);
24 } 24 }
25 25
26 scoped_ptr<cc::CompositorFrame> TestSynchronousCompositor::DemandDrawHw( 26 scoped_ptr<cc::CompositorFrame> TestSynchronousCompositor::DemandDrawHw(
27 gfx::Size surface_size, 27 const gfx::Size& surface_size,
28 const gfx::Transform& transform, 28 const gfx::Transform& transform,
29 gfx::Rect viewport, 29 const gfx::Rect& viewport,
30 gfx::Rect clip, 30 const gfx::Rect& clip,
31 gfx::Rect viewport_rect_for_tile_priority, 31 const gfx::Rect& viewport_rect_for_tile_priority,
32 const gfx::Transform& transform_for_tile_priority) { 32 const gfx::Transform& transform_for_tile_priority) {
33 return hardware_frame_.Pass(); 33 return hardware_frame_.Pass();
34 } 34 }
35 35
36 bool TestSynchronousCompositor::DemandDrawSw(SkCanvas* canvas) { 36 bool TestSynchronousCompositor::DemandDrawSw(SkCanvas* canvas) {
37 DCHECK(canvas); 37 DCHECK(canvas);
38 return true; 38 return true;
39 } 39 }
40 40
41 void TestSynchronousCompositor::SetHardwareFrame( 41 void TestSynchronousCompositor::SetHardwareFrame(
42 scoped_ptr<cc::CompositorFrame> frame) { 42 scoped_ptr<cc::CompositorFrame> frame) {
43 hardware_frame_ = frame.Pass(); 43 hardware_frame_ = frame.Pass();
44 } 44 }
45 45
46 } // namespace content 46 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698