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

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

Issue 1235203003: WIP cc: remove unused and legacy GetMappedMemoryLimit code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/output/context_provider.cc ('k') | cc/test/test_context_provider.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_TEST_CONTEXT_PROVIDER_H_ 5 #ifndef CC_TEST_TEST_CONTEXT_PROVIDER_H_
6 #define CC_TEST_TEST_CONTEXT_PROVIDER_H_ 6 #define CC_TEST_TEST_CONTEXT_PROVIDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // This returns the TestWebGraphicsContext3D but is valid to call 49 // This returns the TestWebGraphicsContext3D but is valid to call
50 // before the context is bound to a thread. This is needed to set up 50 // before the context is bound to a thread. This is needed to set up
51 // state on the test context before binding. Don't call 51 // state on the test context before binding. Don't call
52 // InitializeOnCurrentThread on the context returned from this method. 52 // InitializeOnCurrentThread on the context returned from this method.
53 TestWebGraphicsContext3D* UnboundTestContext3d(); 53 TestWebGraphicsContext3D* UnboundTestContext3d();
54 54
55 TestContextSupport* support() { return &support_; } 55 TestContextSupport* support() { return &support_; }
56 56
57 void SetMemoryAllocation(const ManagedMemoryPolicy& policy); 57 void SetMemoryAllocation(const ManagedMemoryPolicy& policy);
58 58
59 void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes);
60
61 protected: 59 protected:
62 explicit TestContextProvider(scoped_ptr<TestWebGraphicsContext3D> context); 60 explicit TestContextProvider(scoped_ptr<TestWebGraphicsContext3D> context);
63 ~TestContextProvider() override; 61 ~TestContextProvider() override;
64 62
65 private: 63 private:
66 void OnLostContext(); 64 void OnLostContext();
67 65
68 TestContextSupport support_; 66 TestContextSupport support_;
69 67
70 scoped_ptr<TestWebGraphicsContext3D> context3d_; 68 scoped_ptr<TestWebGraphicsContext3D> context3d_;
(...skipping 14 matching lines...) Expand all
85 83
86 base::WeakPtrFactory<TestContextProvider> weak_ptr_factory_; 84 base::WeakPtrFactory<TestContextProvider> weak_ptr_factory_;
87 85
88 DISALLOW_COPY_AND_ASSIGN(TestContextProvider); 86 DISALLOW_COPY_AND_ASSIGN(TestContextProvider);
89 }; 87 };
90 88
91 } // namespace cc 89 } // namespace cc
92 90
93 #endif // CC_TEST_TEST_CONTEXT_PROVIDER_H_ 91 #endif // CC_TEST_TEST_CONTEXT_PROVIDER_H_
94 92
OLDNEW
« no previous file with comments | « cc/output/context_provider.cc ('k') | cc/test/test_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698