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

Side by Side Diff: tools/VisualBench/VisualBench.h

Issue 1416063002: Force VisualBench to reset GLContext on GrContext reset (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks 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
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 * 6 *
7 */ 7 */
8 8
9 #ifndef VisualBench_DEFINED 9 #ifndef VisualBench_DEFINED
10 #define VisualBench_DEFINED 10 #define VisualBench_DEFINED
(...skipping 30 matching lines...) Expand all
41 void draw(SkCanvas* canvas) override; 41 void draw(SkCanvas* canvas) override;
42 42
43 void onSizeChange() override; 43 void onSizeChange() override;
44 44
45 private: 45 private:
46 void setTitle(); 46 void setTitle();
47 bool setupBackend(); 47 bool setupBackend();
48 void resetContext(); 48 void resetContext();
49 void setupRenderTarget(); 49 void setupRenderTarget();
50 bool onHandleChar(SkUnichar unichar) override; 50 bool onHandleChar(SkUnichar unichar) override;
51 void tearDownContext();
52 void setupContext();
51 53
52 // support framework 54 // support framework
53 SkAutoTDelete<VisualModule> fModule; 55 SkAutoTDelete<VisualModule> fModule;
54 SkAutoTUnref<SkSurface> fSurface; 56 SkAutoTUnref<SkSurface> fSurface;
55 SkAutoTUnref<GrContext> fContext; 57 SkAutoTUnref<GrContext> fContext;
56 SkAutoTUnref<GrRenderTarget> fRenderTarget; 58 SkAutoTUnref<GrRenderTarget> fRenderTarget;
57 AttachmentInfo fAttachmentInfo; 59 AttachmentInfo fAttachmentInfo;
58 SkAutoTUnref<const GrGLInterface> fInterface; 60 SkAutoTUnref<const GrGLInterface> fInterface;
59 61
60 typedef SkOSWindow INHERITED; 62 typedef SkOSWindow INHERITED;
61 }; 63 };
62 64
63 #endif 65 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698