summaryrefslogtreecommitdiffstats
path: root/o3d/plugin
diff options
context:
space:
mode:
authorgman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-01 02:59:36 +0000
committergman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-01 02:59:36 +0000
commit38570a4a25452eaa63d0556456f80d33c0e231df (patch)
treede13ded36a0a39340587de17ea8c3a3f712d8080 /o3d/plugin
parent240c058e978c761a1c2ab644e01b8d383988f2b3 (diff)
downloadchromium_src-38570a4a25452eaa63d0556456f80d33c0e231df.zip
chromium_src-38570a4a25452eaa63d0556456f80d33c0e231df.tar.gz
chromium_src-38570a4a25452eaa63d0556456f80d33c0e231df.tar.bz2
Update Texture::Lock to take an AccessMode.
Also, split Lock/Unlock into common and platform specific parts. This is needed to work around an apparent bug in mac drivers where glGetTexImage apparently doesn't always work. This doesn't solve the issue unless we disallow READ completely. Not sure what to about that except make a small GL sample and report the bug to Apple. Review URL: http://codereview.chromium.org/173640 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25012 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin')
-rw-r--r--o3d/plugin/cross/texture_static_glue.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/o3d/plugin/cross/texture_static_glue.cc b/o3d/plugin/cross/texture_static_glue.cc
index 94d29f9..08d27b2 100644
--- a/o3d/plugin/cross/texture_static_glue.cc
+++ b/o3d/plugin/cross/texture_static_glue.cc
@@ -234,7 +234,7 @@ void SetRectCheck2D(o3d::Texture2D* self,
return;
}
}
- o3d::Texture2D::LockHelper helper(self, level);
+ o3d::Texture2D::LockHelper helper(self, level, o3d::Texture::kWriteOnly);
void* data = helper.GetData();
if (!data) {
O3D_ERROR(self->service_locator()) << "could not lock texture";
@@ -310,7 +310,8 @@ void SetRectCheckCUBE(o3d::TextureCUBE* self,
return;
}
}
- o3d::TextureCUBE::LockHelper helper(self, face, level);
+ o3d::TextureCUBE::LockHelper helper(
+ self, face, level, o3d::Texture::kWriteOnly);
void* data = helper.GetData();
if (!data) {
O3D_ERROR(self->service_locator()) << "could not lock texture";
@@ -494,7 +495,7 @@ std::vector<float> userglue_method_GetRect(o3d::Texture2D* self,
<< "Texture::Set not supported for this type of texture";
return empty;
}
- o3d::Texture2D::LockHelper helper(self, level);
+ o3d::Texture2D::LockHelper helper(self, level, o3d::Texture::kReadOnly);
void* data = helper.GetData();
if (!data) {
O3D_ERROR(self->service_locator()) << "could not lock texture";
@@ -580,7 +581,8 @@ std::vector<float> userglue_method_GetRect(o3d::TextureCUBE* self,
<< "Texture::Set not supported for this type of texture";
return empty;
}
- o3d::TextureCUBE::LockHelper helper(self, face, level);
+ o3d::TextureCUBE::LockHelper helper(
+ self, face, level, o3d::Texture::kReadOnly);
void* data = helper.GetData();
if (!data) {
O3D_ERROR(self->service_locator()) << "could not lock texture";