mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-20 00:20:37 +00:00
Bug 895116: Use RGBARectProgram in nsChildView r=mattwoodrow
This commit is contained in:
parent
25658dc89f
commit
d7fdf67911
@ -327,8 +327,8 @@ public:
|
||||
virtual GLContext* gl() const MOZ_OVERRIDE { return mGLContext; }
|
||||
virtual ShaderProgramOGL* GetProgram(ShaderProgramType aType) MOZ_OVERRIDE
|
||||
{
|
||||
MOZ_ASSERT(aType == BGRARectLayerProgramType, "unexpected program type");
|
||||
return mBGRARectProgram;
|
||||
MOZ_ASSERT(aType == RGBARectLayerProgramType, "unexpected program type");
|
||||
return mRGBARectProgram;
|
||||
}
|
||||
virtual void BindAndDrawQuad(ShaderProgramOGL *aProg) MOZ_OVERRIDE;
|
||||
|
||||
@ -343,7 +343,7 @@ public:
|
||||
|
||||
protected:
|
||||
nsRefPtr<mozilla::gl::GLContext> mGLContext;
|
||||
nsAutoPtr<mozilla::layers::ShaderProgramOGL> mBGRARectProgram;
|
||||
nsAutoPtr<mozilla::layers::ShaderProgramOGL> mRGBARectProgram;
|
||||
GLuint mQuadVBO;
|
||||
};
|
||||
|
||||
@ -2603,8 +2603,8 @@ GLPresenter::GLPresenter(GLContext* aContext)
|
||||
{
|
||||
mGLContext->SetFlipped(true);
|
||||
mGLContext->MakeCurrent();
|
||||
mBGRARectProgram = new ShaderProgramOGL(mGLContext,
|
||||
ProgramProfileOGL::GetProfileFor(BGRARectLayerProgramType, MaskNone));
|
||||
mRGBARectProgram = new ShaderProgramOGL(mGLContext,
|
||||
ProgramProfileOGL::GetProfileFor(RGBARectLayerProgramType, MaskNone));
|
||||
|
||||
// Create mQuadVBO.
|
||||
mGLContext->fGenBuffers(1, &mQuadVBO);
|
||||
@ -2668,7 +2668,7 @@ GLPresenter::BeginFrame(nsIntSize aRenderSize)
|
||||
gfx3DMatrix matrix3d = gfx3DMatrix::From2D(viewMatrix);
|
||||
matrix3d._33 = 0.0f;
|
||||
|
||||
mBGRARectProgram->CheckAndSetProjectionMatrix(matrix3d);
|
||||
mRGBARectProgram->CheckAndSetProjectionMatrix(matrix3d);
|
||||
|
||||
// Default blend function implements "OVER"
|
||||
mGLContext->fBlendFuncSeparate(LOCAL_GL_ONE, LOCAL_GL_ONE_MINUS_SRC_ALPHA,
|
||||
|
Loading…
x
Reference in New Issue
Block a user