Chromium Code Reviews

Unified Diff: samples/o3d-webgl/bitmap.js

Issue 1092003: Fixed a lot of bugs with render surfaces and bitmaps. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « samples/o3d-webgl-samples/shadow-map.html ('k') | samples/o3d-webgl/bounding_box.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/o3d-webgl/bitmap.js
===================================================================
--- samples/o3d-webgl/bitmap.js (revision 41482)
+++ samples/o3d-webgl/bitmap.js (working copy)
@@ -74,6 +74,24 @@
/**
+ * The scratch canvas object.
+ * @private
+ */
+o3d.Bitmap.scratch_canvas_ = null;
+
+
+/**
+ * Gets a canvas to use for scratch work.
+ * @private
+ */
+o3d.Bitmap.getScratchCanvas_ = function() {
+ if (!o3d.Bitmap.scratch_canvas_)
+ o3d.Bitmap.scratch_canvas_ = document.createElement('CANVAS');
+ return o3d.Bitmap.scratch_canvas_;
+}
+
+
+/**
* In webgl the bitmap object is represented by an offscreen canvas.
* @type {Canvas}
* @private
@@ -89,6 +107,7 @@
};
+
/**
* Generates mip maps from the source level to lower levels.
*
« no previous file with comments | « samples/o3d-webgl-samples/shadow-map.html ('k') | samples/o3d-webgl/bounding_box.js » ('j') | no next file with comments »

Powered by Google App Engine