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

Side by Side Diff: cc/test/fake_output_surface.h

Issue 1394263004: android webview: allow cc to fail hardware draw (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: damage before hardware to avoid invalidate-draw loop Created 5 years, 2 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/test/fake_layer_tree_host_impl_client.h ('k') | cc/trees/layer_tree_host_impl.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #ifndef CC_TEST_FAKE_OUTPUT_SURFACE_H_ 5 #ifndef CC_TEST_FAKE_OUTPUT_SURFACE_H_
6 #define CC_TEST_FAKE_OUTPUT_SURFACE_H_ 6 #define CC_TEST_FAKE_OUTPUT_SURFACE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 new FakeOutputSurface(TestContextProvider::Create(context.Pass()), 72 new FakeOutputSurface(TestContextProvider::Create(context.Pass()),
73 TestContextProvider::CreateWorker(), true)); 73 TestContextProvider::CreateWorker(), true));
74 } 74 }
75 75
76 static scoped_ptr<FakeOutputSurface> CreateDelegatingSoftware( 76 static scoped_ptr<FakeOutputSurface> CreateDelegatingSoftware(
77 scoped_ptr<SoftwareOutputDevice> software_device) { 77 scoped_ptr<SoftwareOutputDevice> software_device) {
78 return make_scoped_ptr( 78 return make_scoped_ptr(
79 new FakeOutputSurface(software_device.Pass(), true)); 79 new FakeOutputSurface(software_device.Pass(), true));
80 } 80 }
81 81
82 static scoped_ptr<FakeOutputSurface> CreateAlwaysDrawAndSwap3d() {
83 scoped_ptr<FakeOutputSurface> surface(Create3d());
84 surface->capabilities_.draw_and_swap_full_viewport_every_frame = true;
85 return surface.Pass();
86 }
87
88 static scoped_ptr<FakeOutputSurface> CreateNoRequireSyncPoint( 82 static scoped_ptr<FakeOutputSurface> CreateNoRequireSyncPoint(
89 scoped_ptr<TestWebGraphicsContext3D> context) { 83 scoped_ptr<TestWebGraphicsContext3D> context) {
90 scoped_ptr<FakeOutputSurface> surface(Create3d(context.Pass())); 84 scoped_ptr<FakeOutputSurface> surface(Create3d(context.Pass()));
91 surface->capabilities_.delegated_sync_points_required = false; 85 surface->capabilities_.delegated_sync_points_required = false;
92 return surface.Pass(); 86 return surface.Pass();
93 } 87 }
94 88
95 static scoped_ptr<FakeOutputSurface> CreateOffscreen( 89 static scoped_ptr<FakeOutputSurface> CreateOffscreen(
96 scoped_ptr<TestWebGraphicsContext3D> context) { 90 scoped_ptr<TestWebGraphicsContext3D> context) {
97 scoped_ptr<FakeOutputSurface> surface(new FakeOutputSurface( 91 scoped_ptr<FakeOutputSurface> surface(new FakeOutputSurface(
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 bool suspended_for_recycle_; 156 bool suspended_for_recycle_;
163 unsigned framebuffer_; 157 unsigned framebuffer_;
164 TransferableResourceArray resources_held_by_parent_; 158 TransferableResourceArray resources_held_by_parent_;
165 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; 159 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_;
166 gfx::Rect last_swap_rect_; 160 gfx::Rect last_swap_rect_;
167 }; 161 };
168 162
169 } // namespace cc 163 } // namespace cc
170 164
171 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ 165 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl_client.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698