diff options
| author | Romain Guy <romainguy@google.com> | 2010-07-30 11:41:14 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-07-30 11:41:14 -0700 |
| commit | 42272759e4c3c406977187fd2b4df8739edccde8 (patch) | |
| tree | 5e2661be9229b27650068368835a5ccf11a2335a /libs/hwui/OpenGLRenderer.cpp | |
| parent | 1951356a71f19c9d6a8c11d22a6dd2663a32f40e (diff) | |
| parent | b82da65cb1601be504241f36778395cd6cb9f87b (diff) | |
| download | frameworks_base-42272759e4c3c406977187fd2b4df8739edccde8.zip frameworks_base-42272759e4c3c406977187fd2b4df8739edccde8.tar.gz frameworks_base-42272759e4c3c406977187fd2b4df8739edccde8.tar.bz2 | |
Merge "Fix improper clipping after a save()"
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
| -rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 3c36f95..cc8e6bc 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -177,7 +177,7 @@ void OpenGLRenderer::setViewport(int width, int height) { } void OpenGLRenderer::prepare() { - mSnapshot = mFirstSnapshot; + mSnapshot = new Snapshot(mFirstSnapshot); mSaveCount = 0; glDisable(GL_SCISSOR_TEST); @@ -188,7 +188,7 @@ void OpenGLRenderer::prepare() { glEnable(GL_SCISSOR_TEST); glScissor(0, 0, mWidth, mHeight); - mSnapshot->clipRect.set(0.0f, 0.0f, mWidth, mHeight); + mSnapshot->setClip(0.0f, 0.0f, mWidth, mHeight); } /////////////////////////////////////////////////////////////////////////////// @@ -569,6 +569,7 @@ void OpenGLRenderer::drawText(const char* text, int bytesCount, int count, chooseBlending(true, mode); bindTexture(mFontRenderer.getTexture(), GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE, 0); + glUniform1i(mCurrentProgram->getUniform("sampler"), 0); int texCoordsSlot = mCurrentProgram->getAttrib("texCoords"); glEnableVertexAttribArray(texCoordsSlot); |
