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

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

Issue 944053004: OffscreenPreRaster and its plumbings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting Created 5 years, 10 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 "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 scoped_ptr<cc::CompositorFrame> TestSynchronousCompositor::DemandDrawHw( 39 scoped_ptr<cc::CompositorFrame> TestSynchronousCompositor::DemandDrawHw(
40 gfx::Size surface_size, 40 gfx::Size surface_size,
41 const gfx::Transform& transform, 41 const gfx::Transform& transform,
42 gfx::Rect viewport, 42 gfx::Rect viewport,
43 gfx::Rect clip, 43 gfx::Rect clip,
44 gfx::Rect viewport_rect_for_tile_priority, 44 gfx::Rect viewport_rect_for_tile_priority,
45 const gfx::Transform& transform_for_tile_priority) { 45 const gfx::Transform& transform_for_tile_priority) {
46 DCHECK(hardware_initialized_); 46 DCHECK(hardware_initialized_);
47 return nullptr; 47 scoped_ptr<cc::CompositorFrame> compositor_frame =
48 make_scoped_ptr(new cc::CompositorFrame());
49 scoped_ptr<cc::DelegatedFrameData> frame(new cc::DelegatedFrameData);
50 scoped_ptr<cc::RenderPass> root_pass(cc::RenderPass::Create());
51 root_pass->SetNew(cc::RenderPassId(1, 1), gfx::Rect(0, 0, 50, 50),
boliu 2015/02/24 22:06:22 Use |viewport|
hush (inactive) 2015/02/24 22:19:03 Done.
52 gfx::Rect(0, 0, 50, 50), gfx::Transform());
53 frame->render_pass_list.push_back(root_pass.Pass());
54 compositor_frame->delegated_frame_data = frame.Pass();
55 return compositor_frame.Pass();
48 } 56 }
49 57
50 void TestSynchronousCompositor::ReturnResources( 58 void TestSynchronousCompositor::ReturnResources(
51 const cc::CompositorFrameAck& frame_ack) { 59 const cc::CompositorFrameAck& frame_ack) {
52 DCHECK(hardware_initialized_); 60 DCHECK(hardware_initialized_);
53 } 61 }
54 62
55 bool TestSynchronousCompositor::DemandDrawSw(SkCanvas* canvas) { 63 bool TestSynchronousCompositor::DemandDrawSw(SkCanvas* canvas) {
56 DCHECK(canvas); 64 DCHECK(canvas);
57 return true; 65 return true;
58 } 66 }
59 67
60 void TestSynchronousCompositor::SetMemoryPolicy(size_t bytes_limit) { 68 void TestSynchronousCompositor::SetMemoryPolicy(size_t bytes_limit) {
61 DCHECK(!bytes_limit || hardware_initialized_) << bytes_limit; 69 DCHECK(!bytes_limit || hardware_initialized_) << bytes_limit;
62 } 70 }
63 71
64 } // namespace content 72 } // namespace content
OLDNEW
« android_webview/browser/test/fake_window.cc ('K') | « android_webview/native/aw_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698