|
This change adds a new parent class to vbs, ibs, textures, and rts: GrResource. The GrGpu object maintains a linked list of all the GrResources it has created so that they can be freed or abandoned by the GrContext when the GrContext is destroyed or the underlying 3D context is lost.
GrResources can outlive the GrContext if the client has kept a ref on them, but they will be marked as invalid.
Motivations:
Enables safe shutdown of a GrContext after the 3D context has already gone away.
SkBitmaps created on a SkGpuDevice are texture backed and have a pointer to GrTexture. The SkBitmap's lifetime is independent of GrContext. When the pixels of a SkBitmap are accessed we will be able to query GrResource to know whether a readback can be performed or if the underlying texture has been freed and we must fail. (Actually adding this plumbing will be a separate change.)
Total comments: 1
Total comments: 3
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+574 lines, -316 lines) |
Patch |
|
M |
gpu/include/GrAtlas.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
|
M |
gpu/include/GrContext.h
|
View
|
1
2
|
3 chunks |
+21 lines, -6 lines |
0 comments
|
Download
|
|
M |
gpu/include/GrGLIndexBuffer.h
|
View
|
1
|
1 chunk |
+17 lines, -12 lines |
0 comments
|
Download
|
|
M |
gpu/include/GrGLTexture.h
|
View
|
|
5 chunks |
+52 lines, -45 lines |
0 comments
|
Download
|
|
M |
gpu/include/GrGLVertexBuffer.h
|
View
|
|
1 chunk |
+14 lines, -12 lines |
0 comments
|
Download
|
|
M |
gpu/include/GrGeometryBuffer.h
|
View
|
|
3 chunks |
+35 lines, -41 lines |
0 comments
|
Download
|
|
M |
gpu/include/GrGpu.h
|
View
|
1
|
4 chunks |
+28 lines, -2 lines |
0 comments
|
Download
|
|
M |
gpu/include/GrIndexBuffer.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gpu/include/GrRefCnt.h
|
View
|
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
|
A |
gpu/include/GrResource.h
|
View
|
1
2
3
4
|
1 chunk |
+77 lines, -0 lines |
0 comments
|
Download
|
|
M |
gpu/include/GrTextStrike.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
gpu/include/GrTexture.h
|
View
|
|
9 chunks |
+27 lines, -25 lines |
0 comments
|
Download
|
|
M |
gpu/include/GrTextureCache.h
|
View
|
|
2 chunks |
+2 lines, -6 lines |
0 comments
|
Download
|
|
M |
gpu/include/GrVertexBuffer.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gpu/src/GrAtlas.cpp
|
View
|
|
1 chunk |
+0 lines, -12 lines |
0 comments
|
Download
|
|
M |
gpu/src/GrContext.cpp
|
View
|
1
2
3
4
5
|
6 chunks |
+44 lines, -16 lines |
0 comments
|
Download
|
|
M |
gpu/src/GrGLIndexBuffer.cpp
|
View
|
1
2
|
4 chunks |
+27 lines, -24 lines |
0 comments
|
Download
|
|
M |
gpu/src/GrGLTexture.cpp
|
View
|
|
8 chunks |
+39 lines, -29 lines |
0 comments
|
Download
|
|
M |
gpu/src/GrGLVertexBuffer.cpp
|
View
|
|
4 chunks |
+28 lines, -24 lines |
0 comments
|
Download
|
|
M |
gpu/src/GrGpu.cpp
|
View
|
1
2
|
2 chunks |
+80 lines, -19 lines |
0 comments
|
Download
|
|
M |
gpu/src/GrGpuGL.cpp
|
View
|
|
7 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
|
A |
gpu/src/GrResource.cpp
|
View
|
1
2
3
|
1 chunk |
+41 lines, -0 lines |
0 comments
|
Download
|
|
M |
gpu/src/GrTextStrike.cpp
|
View
|
|
1 chunk |
+2 lines, -9 lines |
0 comments
|
Download
|
|
M |
gpu/src/GrTextureCache.cpp
|
View
|
|
3 chunks |
+2 lines, -5 lines |
0 comments
|
Download
|
|
M |
gyp/skia.gyp
|
View
|
1
2
3
4
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
include/gpu/SkGr.h
|
View
|
|
1 chunk |
+0 lines, -8 lines |
0 comments
|
Download
|
|
M |
samplecode/SampleApp.cpp
|
View
|
1
2
|
1 chunk |
+9 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/gpu/SkGr.cpp
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
|
M |
xcode/gpu/gpu.xcodeproj/project.pbxproj
|
View
|
|
6 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
Total messages: 9
|