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

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

Issue 12212007: cc: Route offscreen context creation for compositor to the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Android build Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_TEST_FAKE_CONTEXT_PROVIDER_H_
6 #define CC_TEST_FAKE_CONTEXT_PROVIDER_H_
7
8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "ui/gl/context_provider.h"
11
12 namespace cc {
13 class TestWebGraphicsContext3D;
14
15 class FakeContextProvider : public ui::ContextProvider {
16 public:
17 typedef base::Callback<scoped_ptr<TestWebGraphicsContext3D>(void)>
18 CreateCallback;
19
20 FakeContextProvider();
21 explicit FakeContextProvider(const CreateCallback& create_callback);
22
23 virtual bool InitializeOnMainThread() OVERRIDE;
24 virtual bool BindToCurrentThread() OVERRIDE;
25 virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE;
26 virtual class GrContext* GrContext() OVERRIDE;
27 virtual void VerifyContexts() OVERRIDE;
28
29 bool destroyed() const { return destroyed_; }
30
31 protected:
32 virtual ~FakeContextProvider();
33
34 CreateCallback create_callback_;
35 bool destroyed_;
36 scoped_ptr<WebKit::WebGraphicsContext3D> context3d_;
37 };
38
39 } // namespace cc
40
41 #endif // CC_TEST_FAKE_CONTEXT_PROVIDER_H_
42
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698