Make ProgramBinary a refcount object and use Binding pointers to maintain it's lifetime on context and program.

Trac #21270
Bug=351
Signed-off-by: Nicolas Capens

This fixes the underlying bug since it allows the context to keep the program binary alive, after a relink has occurred.



git-svn-id: https://angleproject.googlecode.com/svn/trunk@1242 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/ProgramBinary.cpp b/src/libGLESv2/ProgramBinary.cpp
index 6eebb8a..df2f0fe 100644
--- a/src/libGLESv2/ProgramBinary.cpp
+++ b/src/libGLESv2/ProgramBinary.cpp
@@ -59,7 +59,7 @@
 
 unsigned int ProgramBinary::mCurrentSerial = 1;
 
-ProgramBinary::ProgramBinary() : mSerial(issueSerial())
+ProgramBinary::ProgramBinary() : RefCountObject(0), mSerial(issueSerial())
 {
     mDevice = getDevice();