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

Side by Side Diff: src/gpu/GrTest.h

Issue 1815823002: Move SkGLContext and some GrGLInterface implementations to skgputest module (Closed) Base URL: https://chromium.googlesource.com/skia.git@debugobject
Patch Set: rebase, readd null interface to main lib Created 4 years, 8 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
(Empty)
1
2 /*
3 * Copyright 2013 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
9 #ifndef GrTest_DEFINED
10 #define GrTest_DEFINED
11
12 #include "GrContext.h"
13 #include "GrDrawTarget.h"
14 #include "gl/GrGLContext.h"
15
16 namespace GrTest {
17 /**
18 * Forces the GrContext to use a small atlas which only has room for one plo t and will thus
19 * constantly be evicting entries
20 */
21 void SetupAlwaysEvictAtlas(GrContext*);
22 };
23
24 /** TODO Please do not use this if you can avoid it. We are in the process of d eleting it.
25 Allows a test to temporarily draw to a GrDrawTarget owned by a GrContext. Te sts that use this
26 should be careful not to mix using the GrDrawTarget directly and drawing via SkCanvas or
27 GrContext. In the future this object may provide some guards to prevent this . */
28 class GrTestTarget {
29 public:
30 GrTestTarget() {};
31
32 void init(GrContext*, GrDrawTarget*, GrRenderTarget*);
33
34 GrDrawTarget* target() { return fDrawTarget.get(); }
35 GrResourceProvider* resourceProvider() { return fContext->resourceProvider() ; }
36
37 private:
38 SkAutoTUnref<GrContext> fContext;
39 SkAutoTUnref<GrDrawTarget> fDrawTarget;
40 SkAutoTUnref<GrRenderTarget> fRenderTarget;
41 };
42
43 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698