summaryrefslogtreecommitdiffstats
path: root/o3d/core
diff options
context:
space:
mode:
authorgman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-29 02:21:49 +0000
committergman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-29 02:21:49 +0000
commit12589e97a64524aadc125b9a2e1961eaabb26619 (patch)
tree769c89843985cd261357357b0af5df7a07c1d09d /o3d/core
parent9bf28dba03b1caaec0f64f54232e7f1acf4eaddf (diff)
downloadchromium_src-12589e97a64524aadc125b9a2e1961eaabb26619.zip
chromium_src-12589e97a64524aadc125b9a2e1961eaabb26619.tar.gz
chromium_src-12589e97a64524aadc125b9a2e1961eaabb26619.tar.bz2
Fix for mac setRect?
Review URL: http://codereview.chromium.org/180030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/core')
-rw-r--r--o3d/core/cross/gl/texture_gl.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/o3d/core/cross/gl/texture_gl.cc b/o3d/core/cross/gl/texture_gl.cc
index 0047bda..4438025 100644
--- a/o3d/core/cross/gl/texture_gl.cc
+++ b/o3d/core/cross/gl/texture_gl.cc
@@ -347,6 +347,7 @@ void Texture2DGL::UpdateBackedMipLevel(unsigned int level) {
DCHECK_EQ(backing_bitmap_->height(), static_cast<unsigned int>(height()));
DCHECK_EQ(backing_bitmap_->format(), format());
DCHECK(HasLevel(level));
+ renderer_->MakeCurrentLazy();
glBindTexture(GL_TEXTURE_2D, gl_texture_);
UpdateGLImageFromBitmap(GL_TEXTURE_2D, level, TextureCUBE::FACE_POSITIVE_X,
*backing_bitmap_.Get(), resize_to_pot_);
@@ -412,6 +413,7 @@ void Texture2DGL::SetRect(int level,
level, dst_left, dst_top, src_width, src_height, src_data, src_pitch);
UpdateBackedMipLevel(level);
} else {
+ renderer_->MakeCurrentLazy();
glBindTexture(GL_TEXTURE_2D, gl_texture_);
GLenum gl_internal_format = 0;
GLenum gl_data_type = 0;
@@ -680,6 +682,7 @@ void TextureCUBEGL::UpdateBackedMipLevel(unsigned int level,
DCHECK_EQ(backing_bitmap->height(), static_cast<unsigned int>(edge_length()));
DCHECK_EQ(backing_bitmap->format(), format());
DCHECK(HasLevel(level, face));
+ renderer_->MakeCurrentLazy();
glBindTexture(GL_TEXTURE_2D, gl_texture_);
UpdateGLImageFromBitmap(kCubemapFaceList[face], level, face,
*backing_bitmap,
@@ -766,6 +769,7 @@ void TextureCUBEGL::SetRect(TextureCUBE::CubeFace face,
UpdateBackedMipLevel(level, face);
} else {
// TODO(gman): Should this bind be using a FACE id?
+ renderer_->MakeCurrentLazy();
glBindTexture(GL_TEXTURE_2D, gl_texture_);
GLenum gl_internal_format = 0;
GLenum gl_data_type = 0;