summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-08 19:55:34 +0000
committerkbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-08 19:55:34 +0000
commite9cf2cac00113e12b14584533594b82dfe5701a6 (patch)
tree6eca083e1bcfbb1c1b9f92cfa4986a6f8a289531
parent9eaa021d46dc016c20e43ed2bcae536922fd979d (diff)
downloadchromium_src-e9cf2cac00113e12b14584533594b82dfe5701a6.zip
chromium_src-e9cf2cac00113e12b14584533594b82dfe5701a6.tar.gz
chromium_src-e9cf2cac00113e12b14584533594b82dfe5701a6.tar.bz2
Build fixes for case when fullscreen message is disabled, for IMC code
path, and for effect.js docs. BUG=none TEST=none (built O3D on Mac) Review URL: http://codereview.chromium.org/1512029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43995 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--o3d/core/cross/message_queue_test.cc3
-rw-r--r--o3d/plugin/mac/plugin_mac.mm26
-rw-r--r--o3d/samples/o3djs/effect.js26
3 files changed, 29 insertions, 26 deletions
diff --git a/o3d/core/cross/message_queue_test.cc b/o3d/core/cross/message_queue_test.cc
index 2987779..c94eb52 100644
--- a/o3d/core/cross/message_queue_test.cc
+++ b/o3d/core/cross/message_queue_test.cc
@@ -744,7 +744,8 @@ void MessageQueueTest::RunTests(int num_threads,
}
// Wait for completion
while (!watchdog->Done()) {
- ASSERT_TRUE(message_queue->CheckForNewMessages());
+ bool has_new_texture = false;
+ ASSERT_TRUE(message_queue->CheckForNewMessages(&has_new_texture));
watchdog->WaitBrieflyForSignal();
}
ASSERT_FALSE(watchdog->Expired());
diff --git a/o3d/plugin/mac/plugin_mac.mm b/o3d/plugin/mac/plugin_mac.mm
index 96669ef..b7361db 100644
--- a/o3d/plugin/mac/plugin_mac.mm
+++ b/o3d/plugin/mac/plugin_mac.mm
@@ -359,6 +359,18 @@ char* CreatePosixFilePathFromHFSFilePath(const char* hfsPath) {
+// Convenience function for fetching SInt32 parameters from Carbon EventRefs.
+static SInt32 GetIntEventParam(EventRef inEvent, EventParamName inName) {
+ SInt32 value = 0;
+ return (GetEventParameter(inEvent, inName, typeSInt32, NULL, sizeof(value),
+ NULL, &value) == noErr) ? value : 0;
+}
+
+
+#pragma mark ____OVERLAY_WINDOW
+
+#ifdef O3D_PLUGIN_ENABLE_FULLSCREEN_MSG
+
// A little wrapper for ATSUSetAttributes to make calling it with one attribute
// less annoying.
static void MySetAttribute(ATSUStyle style,
@@ -387,20 +399,6 @@ static void MySetLayoutControl(ATSUTextLayout layout,
ATSUSetLayoutControls(layout, 1, tags, sizes, values);
}
-
-
-// Convenience function for fetching SInt32 parameters from Carbon EventRefs.
-static SInt32 GetIntEventParam(EventRef inEvent, EventParamName inName) {
- SInt32 value = 0;
- return (GetEventParameter(inEvent, inName, typeSInt32, NULL, sizeof(value),
- NULL, &value) == noErr) ? value : 0;
-}
-
-
-#pragma mark ____OVERLAY_WINDOW
-
-#ifdef O3D_PLUGIN_ENABLE_FULLSCREEN_MSG
-
// Returns the unicode 16 chars that we need to display as the fullscreen
// message. Should be disposed with free() after use.
static UniChar * GetFullscreenDisplayText(int *returned_length) {
diff --git a/o3d/samples/o3djs/effect.js b/o3d/samples/o3djs/effect.js
index 7b458474..1fc6e01 100644
--- a/o3d/samples/o3djs/effect.js
+++ b/o3d/samples/o3djs/effect.js
@@ -62,7 +62,7 @@ o3djs.effect.TWO_COLOR_CHECKER_EFFECT_NAME =
* the o3d shading language. When setLanguage gets called the properties of
* this object get coppied into the o3djs.effect namespace and then get used
* in shader generation code.
- * @type {namespace}
+ * @namespace
*/
o3djs.effect.o3d = {
FLOAT2: 'float2',
@@ -88,7 +88,7 @@ o3djs.effect.o3d = {
* the o3d shading language. When setLanguage gets called the properties of
* this object get coppied into the o3djs.effect namespace and then get used
* in shader generation code.
- * @type {namespace}
+ * @namespace
*/
o3djs.effect.glsl = {
FLOAT2: 'vec2',
@@ -112,6 +112,7 @@ o3djs.effect.glsl = {
/**
* The string that goes between the stream name and the semicolon too indicate
* the semantic.
+ * @param {string} name Name of the semantic.
* @return {string}
*/
o3djs.effect.glsl.semanticSuffix = function(name) {
@@ -122,6 +123,7 @@ o3djs.effect.glsl.semanticSuffix = function(name) {
/**
* The string that goes between the stream name and the semicolon too indicate
* the semantic.
+ * @param {string} name Name of the semantic.
* @return {string}
*/
o3djs.effect.o3d.semanticSuffix = function(name) {
@@ -217,7 +219,7 @@ o3djs.effect.o3d.endVertexShaderMain = function() {
* @param {boolean} diffuse Whether to include stuff for diffuse calculations.
* @param {boolean} specular Whether to include stuff for diffuse
* calculations.
- * @param {boolean} bumpSampler Whether there is a bumpSampler.
+ * @param {boolean} bumpSampler Whether there is a bump sampler.
* @return {string} The header.
*/
o3djs.effect.glsl.pixelShaderHeader =
@@ -232,7 +234,7 @@ o3djs.effect.glsl.pixelShaderHeader =
* @param {boolean} diffuse Whether to include stuff for diffuse calculations.
* @param {boolean} specular Whether to include stuff for diffuse
* calculations.
- * @param {boolean} bumpSampler Whether there is a bumpSampler.
+ * @param {boolean} bumpSampler Whether there is a bump sampler.
* @return {string} The header.
*/
o3djs.effect.o3d.pixelShaderHeader =
@@ -315,7 +317,7 @@ o3djs.effect.o3d.entryPoints = function() {
/**
* The vertex and fragment shader entry points. In glsl, this is unnecessary.
- * @type {string}
+ * @return {string}
*/
o3djs.effect.glsl.entryPoints = function() {
return '';
@@ -326,6 +328,7 @@ o3djs.effect.glsl.entryPoints = function() {
* Sets the shader language used. Passing 'glsl' will cause all generated
* shader code to be in glsl. Passing anything else will result in the
* default o3d hlsl/cg based shader language.
+ * @param {string} language Shader language to use.
*/
o3djs.effect.setLanguage = function(language) {
var language_namespace = o3djs.effect.o3d;
@@ -347,7 +350,7 @@ o3djs.effect.setLanguage = function(language) {
* @param {boolean} diffuse Whether to include stuff for diffuse calculations.
* @param {boolean} specular Whether to include stuff for diffuse
* calculations.
- * @param {boolean} bumpSampler Whether there is a bumpSampler.
+ * @param {boolean} bumpSampler Whether there is a bump sampler.
* @return {string} The code for the declarations.
*/
o3djs.effect.buildAttributeDecls =
@@ -380,7 +383,7 @@ o3djs.effect.varying_decls_ = '';
* @param {boolean} diffuse Whether to include stuff for diffuse calculations.
* @param {boolean} specular Whether to include stuff for diffuse
* calculations.
- * @param {boolean} bumpSampler Whether there is a bumpSampler.
+ * @param {boolean} bumpSampler Whether there is a bump sampler.
* @return {string} The code for the declarations.
*/
o3djs.effect.buildVaryingDecls =
@@ -496,7 +499,7 @@ o3djs.effect.buildUVPassthroughs = function(material) {
/**
* Builds bump input coords if needed.
- * @param {bumpSampler} Whether there is a bump sampler.
+ * @param {boolean} bumpSampler Whether there is a bump sampler.
* @return {string} The code for bump input coords.
*/
o3djs.effect.buildBumpInputCoords = function(bumpSampler) {
@@ -514,7 +517,7 @@ o3djs.effect.buildBumpInputCoords = function(bumpSampler) {
/**
* Builds bump output coords if needed.
- * @param {boolean} bumpSampler Whether there is a bumpSampler.
+ * @param {boolean} bumpSampler Whether there is a bump sampler.
* @return {string} The code for bump input coords.
*/
o3djs.effect.buildBumpOutputCoords = function(bumpSampler) {
@@ -1090,10 +1093,11 @@ o3djs.effect.buildStandardShaderString = function(material,
/**
* Builds the normal map part of the vertex shader.
- * @param {boolean} bumpSampler Whether there is a bump sampler.
+ * @param {boolean} opt_bumpSampler Whether there is a bump
+ * sampler. Default = false.
* @return {string} The code for normal mapping in the vertex shader.
*/
- var bumpVertexShaderCode = function(bumpSampler) {
+ var bumpVertexShaderCode = function(opt_bumpSampler) {
return bumpSampler ?
(' ' + p.VERTEX_VARYING_PREFIX + 'binormal = ' +
p.mul(p.FLOAT4 + '(' +