Revision c126aa85
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/examples/plainmonalisa/PlainMonaLisaSurfaceView.java | ||
---|---|---|
43 | 43 |
|
44 | 44 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
45 | 45 |
|
46 |
@Override |
|
46 | 47 |
public void surfaceCreated(SurfaceHolder holder) |
47 | 48 |
{ |
48 | 49 |
Log.d(TAG, "surfaceCreated holder=" + holder); |
... | ... | |
64 | 65 |
|
65 | 66 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
66 | 67 |
|
68 |
@Override |
|
67 | 69 |
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) |
68 | 70 |
{ |
69 | 71 |
Log.d(TAG, "surfaceChanged fmt=" + format + " size=" + width + "x" + height +" holder=" + holder); |
... | ... | |
78 | 80 |
|
79 | 81 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
80 | 82 |
|
83 |
@Override |
|
81 | 84 |
public void surfaceDestroyed(SurfaceHolder holder) |
82 | 85 |
{ |
83 | 86 |
Log.d(TAG, "surfaceDestroyed holder=" + holder); |
... | ... | |
112 | 115 |
public void onPause() |
113 | 116 |
{ |
114 | 117 |
mPaused = true; |
118 |
RenderThread.setResourcesCreated(); |
|
115 | 119 |
|
116 | 120 |
Log.d(TAG, "onPause unhooking choreographer"); |
117 | 121 |
Choreographer.getInstance().removeFrameCallback(this); |
Also available in: Unified diff
Fix PlainMonaLisa's Activity lifecycle (it wouldn't work after a POWER button press, i.e. after a brief time in the background - surfaceCreated is not called in this case)