From f603d212552485c634e25f3556f847dc2b022bd5 Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Fri, 14 May 2010 15:30:29 -0700 Subject: Change RS to use the passed surface size rather than EGL size. Its possible that during a resize the EGL information could be stale so caching this is bad. The surface size should always be correct. Change-Id: Ifd479e1ea70b1cada1a8690c7c82e91aa391b685 Conflicts: libs/rs/rsProgramStore.cpp libs/rs/rsProgramStore.h --- libs/rs/rsProgramVertex.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libs/rs/rsProgramVertex.cpp') diff --git a/libs/rs/rsProgramVertex.cpp b/libs/rs/rsProgramVertex.cpp index a2b2df4d967e..c3264aed76bd 100644 --- a/libs/rs/rsProgramVertex.cpp +++ b/libs/rs/rsProgramVertex.cpp @@ -362,7 +362,7 @@ ProgramVertexState::~ProgramVertexState() { } -void ProgramVertexState::init(Context *rsc, int32_t w, int32_t h) +void ProgramVertexState::init(Context *rsc) { RsElement e = (RsElement) Element::create(rsc, RS_TYPE_FLOAT_32, RS_KIND_USER, false, 1); @@ -382,13 +382,13 @@ void ProgramVertexState::init(Context *rsc, int32_t w, int32_t h) color[2] = 1.f; color[3] = 1.f; - updateSize(rsc, w, h); + updateSize(rsc); } -void ProgramVertexState::updateSize(Context *rsc, int32_t w, int32_t h) +void ProgramVertexState::updateSize(Context *rsc) { Matrix m; - m.loadOrtho(0,w, h,0, -1,1); + m.loadOrtho(0,rsc->getWidth(), rsc->getHeight(),0, -1,1); mDefaultAlloc->subData(RS_PROGRAM_VERTEX_PROJECTION_OFFSET, 16, &m.m[0], 16*4); m.loadIdentity(); -- cgit v1.2.3-59-g8ed1b