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

Side by Side Diff: include/gpu/GrContext.h

Issue 251013002: Split GrResource into GrCacheable/GrGpuObject (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 6 years, 7 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
« no previous file with comments | « include/gpu/GrCacheable.h ('k') | include/gpu/GrGpuObject.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2010 Google Inc. 2 * Copyright 2010 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 #ifndef GrContext_DEFINED 8 #ifndef GrContext_DEFINED
9 #define GrContext_DEFINED 9 #define GrContext_DEFINED
10 10
11 #include "GrClipData.h" 11 #include "GrClipData.h"
12 #include "GrColor.h" 12 #include "GrColor.h"
13 #include "GrPaint.h" 13 #include "GrPaint.h"
14 #include "GrPathRendererChain.h" 14 #include "GrPathRendererChain.h"
15 #include "GrPoint.h" 15 #include "GrPoint.h"
16 #include "GrRenderTarget.h" 16 #include "GrRenderTarget.h"
17 #include "GrTexture.h" 17 #include "GrTexture.h"
18 #include "SkMatrix.h" 18 #include "SkMatrix.h"
19 #include "SkTypes.h" 19 #include "SkTypes.h"
20 20
21 class GrAARectRenderer; 21 class GrAARectRenderer;
22 class GrAutoScratchTexture; 22 class GrAutoScratchTexture;
23 class GrCacheable;
23 class GrDrawState; 24 class GrDrawState;
24 class GrDrawTarget; 25 class GrDrawTarget;
25 class GrEffect; 26 class GrEffect;
26 class GrFontCache; 27 class GrFontCache;
27 class GrGpu; 28 class GrGpu;
28 class GrIndexBuffer; 29 class GrIndexBuffer;
29 class GrIndexBufferAllocPool; 30 class GrIndexBufferAllocPool;
30 class GrInOrderDrawBuffer; 31 class GrInOrderDrawBuffer;
31 class GrLayerCache; 32 class GrLayerCache;
32 class GrOvalRenderer; 33 class GrOvalRenderer;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 entry->fFunc = cleanUp; 81 entry->fFunc = cleanUp;
81 entry->fInfo = info; 82 entry->fInfo = info;
82 } 83 }
83 84
84 /** 85 /**
85 * Abandons all GPU resources, assumes 3D API state is unknown. Call this 86 * Abandons all GPU resources, assumes 3D API state is unknown. Call this
86 * if you have lost the associated GPU context, and thus internal texture, 87 * if you have lost the associated GPU context, and thus internal texture,
87 * buffer, etc. references/IDs are now invalid. Should be called even when 88 * buffer, etc. references/IDs are now invalid. Should be called even when
88 * GrContext is no longer going to be used for two reasons: 89 * GrContext is no longer going to be used for two reasons:
89 * 1) ~GrContext will not try to free the objects in the 3D API. 90 * 1) ~GrContext will not try to free the objects in the 3D API.
90 * 2) If you've created GrResources that outlive the GrContext they will 91 * 2) If you've created GrGpuObjects that outlive the GrContext they will
91 * be marked as invalid (GrResource::isValid()) and won't attempt to 92 * be marked as invalid (GrGpuObjects::isValid()) and won't attempt to
92 * free their underlying resource in the 3D API. 93 * free their underlying resource in the 3D API.
93 * Content drawn since the last GrContext::flush() may be lost. 94 * Content drawn since the last GrContext::flush() may be lost.
94 */ 95 */
95 void contextLost(); 96 void contextLost();
96 97
97 /** 98 /**
98 * Similar to contextLost, but makes no attempt to reset state. 99 * Similar to contextLost, but makes no attempt to reset state.
99 * Use this method when GrContext destruction is pending, but 100 * Use this method when GrContext destruction is pending, but
100 * the graphics context is destroyed first. 101 * the graphics context is destroyed first.
101 */ 102 */
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 } 1089 }
1089 1090
1090 GrTexture* texture() { return fTexture; } 1091 GrTexture* texture() { return fTexture; }
1091 1092
1092 private: 1093 private:
1093 GrContext* fContext; 1094 GrContext* fContext;
1094 GrTexture* fTexture; 1095 GrTexture* fTexture;
1095 }; 1096 };
1096 1097
1097 #endif 1098 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrCacheable.h ('k') | include/gpu/GrGpuObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698