Merge commit '54f5ca4115b776eb5a1e04a4c014acccb916ef9c' * commit '54f5ca4115b776eb5a1e04a4c014acccb916ef9c': Add Java exceptions to catch RS calls with no context or no surface.
This commit is contained in:
@@ -244,6 +244,18 @@ public class RenderScript {
|
||||
}
|
||||
}
|
||||
|
||||
void validate() {
|
||||
if (mContext == 0) {
|
||||
throw new IllegalStateException("Calling RS with no Context active.");
|
||||
}
|
||||
}
|
||||
|
||||
void validateSurface() {
|
||||
if (mSurface == null) {
|
||||
throw new IllegalStateException("Uploading data to GL with no surface.");
|
||||
}
|
||||
}
|
||||
|
||||
public void contextSetPriority(Priority p) {
|
||||
nContextSetPriority(p.mID);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user