Bug 1116473 - [2.1] Const-correctness fixes. r=snorp

This commit is contained in:
Eugen Sawin 2016-02-18 23:56:31 +01:00
parent e8dc51ceee
commit d5f668aef8
2 changed files with 10 additions and 9 deletions

View File

@ -238,7 +238,7 @@ AndroidSurfaceTexture::UpdateTexImage()
}
void
AndroidSurfaceTexture::GetTransformMatrix(gfx::Matrix4x4& aMatrix)
AndroidSurfaceTexture::GetTransformMatrix(gfx::Matrix4x4& aMatrix) const
{
JNIEnv* const env = jni::GetEnvForThread();

View File

@ -58,19 +58,19 @@ public:
// Ability to detach is based on API version (16+), and we also block PowerVR since it has some type
// of fencing problem. Bug 1100126.
bool CanDetach() { return mCanDetach; }
bool CanDetach() const { return mCanDetach; }
GLContext* GetAttachedContext() { return mAttachedContext; }
GLContext* AttachedContext() const { return mAttachedContext; }
AndroidNativeWindow* NativeWindow() {
AndroidNativeWindow* NativeWindow() const {
return mNativeWindow;
}
// This attaches the updated data to the TEXTURE_EXTERNAL target
void UpdateTexImage();
void GetTransformMatrix(mozilla::gfx::Matrix4x4& aMatrix);
int ID() { return mID; }
void GetTransformMatrix(mozilla::gfx::Matrix4x4& aMatrix) const;
int ID() const { return mID; }
void SetDefaultSize(mozilla::gfx::IntSize size);
@ -82,8 +82,8 @@ public:
// callback from the underlying SurfaceTexture instance
void NotifyFrameAvailable();
GLuint Texture() { return mTexture; }
const widget::sdk::Surface::Ref& JavaSurface() { return mSurface; }
GLuint Texture() const { return mTexture; }
const widget::sdk::Surface::Ref& JavaSurface() const { return mSurface; }
private:
AndroidSurfaceTexture();
@ -96,13 +96,14 @@ private:
widget::sdk::SurfaceTexture::GlobalRef mSurfaceTexture;
widget::sdk::Surface::GlobalRef mSurface;
Monitor mMonitor;
GLContext* mAttachedContext;
bool mCanDetach;
RefPtr<AndroidNativeWindow> mNativeWindow;
int mID;
nsCOMPtr<nsIRunnable> mFrameAvailableCallback;
mutable Monitor mMonitor;
};
}