/** * Should be called at {@link #start()} and {@link #stop()} * from within the animator thread. * <p> * At {@link #stop()} an additional {@link #display()} call shall be issued * to allow propagation of releasing the exclusive thread. * </p> */ protected final synchronized void setDrawablesExclCtxState(final boolean enable) { if(DEBUG) { System.err.println("AnimatorBase.setExclusiveContextImpl exlusive "+exclusiveContext+": Enable "+enable+" for "+this+" - "+Thread.currentThread()); // Thread.dumpStack(); } final Thread ect = getExclusiveContextThread(); for (int i=0; i<drawables.size(); i++) { try { drawables.get(i).setExclusiveContextThread( enable ? ect : null ); } catch (final RuntimeException e) { e.printStackTrace(); } } } protected final boolean validateDrawablesExclCtxState(final Thread expected) {
/** * Should be called at {@link #start()} and {@link #stop()} * from within the animator thread. * <p> * At {@link #stop()} an additional {@link #display()} call shall be issued * to allow propagation of releasing the exclusive thread. * </p> */ protected final synchronized void setDrawablesExclCtxState(final boolean enable) { if(DEBUG) { System.err.println("AnimatorBase.setExclusiveContextImpl exlusive "+exclusiveContext+": Enable "+enable+" for "+this+" - "+Thread.currentThread()); // Thread.dumpStack(); } final Thread ect = getExclusiveContextThread(); for (int i=0; i<drawables.size(); i++) { try { drawables.get(i).setExclusiveContextThread( enable ? ect : null ); } catch (final RuntimeException e) { e.printStackTrace(); } } } protected final boolean validateDrawablesExclCtxState(final Thread expected) {
/** * Should be called at {@link #start()} and {@link #stop()} * from within the animator thread. * <p> * At {@link #stop()} an additional {@link #display()} call shall be issued * to allow propagation of releasing the exclusive thread. * </p> */ protected final synchronized void setDrawablesExclCtxState(final boolean enable) { if(DEBUG) { System.err.println("AnimatorBase.setExclusiveContextImpl exlusive "+exclusiveContext+": Enable "+enable+" for "+this+" - "+Thread.currentThread()); // Thread.dumpStack(); } final Thread ect = getExclusiveContextThread(); for (int i=0; i<drawables.size(); i++) { try { drawables.get(i).setExclusiveContextThread( enable ? ect : null ); } catch (final RuntimeException e) { e.printStackTrace(); } } } protected final boolean validateDrawablesExclCtxState(final Thread expected) {
@Override public String toString() { return getClass().getName()+"[started "+isStarted()+", animating "+isAnimating()+", paused "+isPaused()+", drawable "+drawables.size()+ ", totals[dt "+getTotalFPSDuration()+", frames "+getTotalFPSFrames()+", fps "+getTotalFPS()+ "], modeBits "+modeBits+", init'ed "+(null!=impl)+", animThread "+getThread()+", exclCtxThread "+exclusiveContext+"("+getExclusiveContextThread()+")]"; } }
@Override public String toString() { return getClass().getName()+"[started "+isStarted()+", animating "+isAnimating()+", paused "+isPaused()+", drawable "+drawables.size()+ ", totals[dt "+getTotalFPSDuration()+", frames "+getTotalFPSFrames()+", fps "+getTotalFPS()+ "], modeBits "+modeBits+", init'ed "+(null!=impl)+", animThread "+getThread()+", exclCtxThread "+exclusiveContext+"("+getExclusiveContextThread()+")]"; } }
@Override public String toString() { return getClass().getName()+"[started "+isStarted()+", animating "+isAnimating()+", paused "+isPaused()+", drawable "+drawables.size()+ ", totals[dt "+getTotalFPSDuration()+", frames "+getTotalFPSFrames()+", fps "+getTotalFPS()+ "], modeBits "+modeBits+", init'ed "+(null!=impl)+", animThread "+getThread()+", exclCtxThread "+exclusiveContext+"("+getExclusiveContextThread()+")]"; } }
pause(); if( isStarted() ) { drawable.setExclusiveContextThread( exclusiveContext ? getExclusiveContextThread() : null ); // if already running ..
pause(); if( isStarted() ) { drawable.setExclusiveContextThread( exclusiveContext ? getExclusiveContextThread() : null ); // if already running ..
pause(); if( isStarted() ) { drawable.setExclusiveContextThread( exclusiveContext ? getExclusiveContextThread() : null ); // if already running ..