summaryrefslogtreecommitdiffstats
path: root/o3d/converter
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/converter
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/converter')
-rw-r--r--o3d/converter/cross/texture_stub.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/o3d/converter/cross/texture_stub.h b/o3d/converter/cross/texture_stub.h
index 3a6c74a..5cb17d7 100644
--- a/o3d/converter/cross/texture_stub.h
+++ b/o3d/converter/cross/texture_stub.h
@@ -80,14 +80,14 @@ class Texture2DStub : public Texture2D {
virtual const RGBASwizzleIndices& GetABGR32FSwizzleIndices();
protected:
- // Locks the image buffer of a given mipmap level for writing from main
- // memory.
- virtual bool Lock(int level, void** texture_data, int* pitch) {
+ // Overridden from Texture2D
+ virtual bool PlatformSpecificLock(
+ int level, void** texture_data, int* pitch, AccessMode mode) {
return false;
}
- // Unlocks this texture and returns it to Stub control.
- virtual bool Unlock(int level) { return true; }
+ // Overridden from Texture2D
+ virtual bool PlatformSpecificUnlock(int level) { return true; }
// Overridden from Texture2D
virtual RenderSurface::Ref PlatformSpecificGetRenderSurface(int mip_level) {
@@ -136,15 +136,15 @@ class TextureCUBEStub : public TextureCUBE {
virtual const RGBASwizzleIndices& GetABGR32FSwizzleIndices();
protected:
- // Locks the image buffer of a given face and mipmap level for loading
- // from main memory.
- virtual bool Lock(
- CubeFace face, int level, void** texture_data, int* pitch) {
+ // Overridden from TextureCUBE
+ virtual bool PlatformSpecificLock(
+ CubeFace face, int level, void** texture_data, int* pitch,
+ AccessMode mode) {
return false;
}
- // Unlocks the image buffer of a given face and mipmap level.
- virtual bool Unlock(CubeFace face, int level) { return true; }
+ // Overridden from TextureCUBE
+ virtual bool PlatformSpecificUnlock(CubeFace face, int level) { return true; }
// Overridden from TextureCUBE
virtual RenderSurface::Ref PlatformSpecificGetRenderSurface(CubeFace face,