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

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

Issue 1418273002: cc: Move draw params from SetExternalDrawConstraints to OnDraw (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests fixed 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 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 new FakeOutputSurface(TestContextProvider::Create(context.Pass()), 47 new FakeOutputSurface(TestContextProvider::Create(context.Pass()),
48 TestContextProvider::CreateWorker(), false)); 48 TestContextProvider::CreateWorker(), false));
49 } 49 }
50 50
51 static scoped_ptr<FakeOutputSurface> CreateSoftware( 51 static scoped_ptr<FakeOutputSurface> CreateSoftware(
52 scoped_ptr<SoftwareOutputDevice> software_device) { 52 scoped_ptr<SoftwareOutputDevice> software_device) {
53 return make_scoped_ptr(new FakeOutputSurface(software_device.Pass(), 53 return make_scoped_ptr(new FakeOutputSurface(software_device.Pass(),
54 false)); 54 false));
55 } 55 }
56 56
57 static scoped_ptr<FakeOutputSurface> Create3DSoftware() {
danakj 2015/11/24 21:17:30 "3d" Create3dWithResourcelessSoftwareSupport? or
boliu 2015/11/24 23:27:38 That works :)
58 return make_scoped_ptr(new FakeOutputSurface(
59 TestContextProvider::Create(),
60 make_scoped_ptr(new SoftwareOutputDevice), false));
61 }
62
57 static scoped_ptr<FakeOutputSurface> CreateDelegating3d() { 63 static scoped_ptr<FakeOutputSurface> CreateDelegating3d() {
58 return make_scoped_ptr( 64 return make_scoped_ptr(
59 new FakeOutputSurface(TestContextProvider::Create(), 65 new FakeOutputSurface(TestContextProvider::Create(),
60 TestContextProvider::CreateWorker(), true)); 66 TestContextProvider::CreateWorker(), true));
61 } 67 }
62 68
63 static scoped_ptr<FakeOutputSurface> CreateDelegating3d( 69 static scoped_ptr<FakeOutputSurface> CreateDelegating3d(
64 scoped_refptr<TestContextProvider> context_provider) { 70 scoped_refptr<TestContextProvider> context_provider) {
65 return make_scoped_ptr(new FakeOutputSurface( 71 return make_scoped_ptr(new FakeOutputSurface(
66 context_provider, TestContextProvider::CreateWorker(), true)); 72 context_provider, TestContextProvider::CreateWorker(), true));
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 bool suspended_for_recycle_; 162 bool suspended_for_recycle_;
157 unsigned framebuffer_; 163 unsigned framebuffer_;
158 TransferableResourceArray resources_held_by_parent_; 164 TransferableResourceArray resources_held_by_parent_;
159 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; 165 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_;
160 gfx::Rect last_swap_rect_; 166 gfx::Rect last_swap_rect_;
161 }; 167 };
162 168
163 } // namespace cc 169 } // namespace cc
164 170
165 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ 171 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698