am 54f5ca41: am ffacbc34: am fd2f6358: Merge change I771bebb9 into eclair

Merge commit '54f5ca4115b776eb5a1e04a4c014acccb916ef9c'

* commit '54f5ca4115b776eb5a1e04a4c014acccb916ef9c':
  Add Java exceptions to catch RS calls with no context or no surface.
This commit is contained in:
Jason Sams
2009-12-07 18:35:48 -08:00
committed by Android Git Automerger
11 changed files with 71 additions and 0 deletions

View File

@@ -47,6 +47,7 @@ public class ProgramFragment extends BaseObj {
public void bindTexture(Allocation va, int slot)
throws IllegalArgumentException {
mRS.validate();
if((slot < 0) || (slot >= MAX_SLOT)) {
throw new IllegalArgumentException("Slot ID out of range.");
}
@@ -56,6 +57,7 @@ public class ProgramFragment extends BaseObj {
public void bindSampler(Sampler vs, int slot)
throws IllegalArgumentException {
mRS.validate();
if((slot < 0) || (slot >= MAX_SLOT)) {
throw new IllegalArgumentException("Slot ID out of range.");
}
@@ -158,6 +160,7 @@ public class ProgramFragment extends BaseObj {
}
public ProgramFragment create() {
mRS.validate();
return internalCreate(mRS, this);
}
}