summaryrefslogtreecommitdiffstats
path: root/o3d/converter
diff options
context:
space:
mode:
authorfransiskusx@google.com <fransiskusx@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-17 17:16:19 +0000
committerfransiskusx@google.com <fransiskusx@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-17 17:16:19 +0000
commit6c8577f2d7ee2c6aebdb3c3c689a7242ee0f167d (patch)
tree889f49da1748664fac2cc420c0d13e6d45e4b651 /o3d/converter
parent26d81d7f2d515cbf3babe720f79b1c2b89646100 (diff)
downloadchromium_src-6c8577f2d7ee2c6aebdb3c3c689a7242ee0f167d.zip
chromium_src-6c8577f2d7ee2c6aebdb3c3c689a7242ee0f167d.tar.gz
chromium_src-6c8577f2d7ee2c6aebdb3c3c689a7242ee0f167d.tar.bz2
Further integration of 2D mode. This change supports calltype=v, transparancy, and image transformation.
Currently only support Linux and compiled when renderer = cairo. TEST= I compiled with renderer = cairo and it worked. Also I compiled with renderer = gl and it worked. BUG=none Review URL: http://codereview.chromium.org/3315023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59811 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/converter')
-rw-r--r--o3d/converter/cross/converter.cc5
-rw-r--r--o3d/converter/cross/renderer_stub.cc3
2 files changed, 8 insertions, 0 deletions
diff --git a/o3d/converter/cross/converter.cc b/o3d/converter/cross/converter.cc
index 4726392..63e52a1 100644
--- a/o3d/converter/cross/converter.cc
+++ b/o3d/converter/cross/converter.cc
@@ -37,6 +37,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/scoped_ptr.h"
+#include "converter/cross/renderer_stub.h"
#include "core/cross/class_manager.h"
#include "core/cross/client.h"
#include "core/cross/client_info.h"
@@ -279,7 +280,11 @@ bool Convert(const FilePath& in_filename,
ErrorCollector error_collector(&service_locator);
scoped_ptr<Renderer> renderer(
+#if !defined(RENDERER_CAIRO)
Renderer::CreateDefaultRenderer(&service_locator));
+#else
+ RendererStub::CreateDefault(&service_locator));
+#endif
renderer->InitCommon();
Pack::Ref pack(object_manager.CreatePack());
diff --git a/o3d/converter/cross/renderer_stub.cc b/o3d/converter/cross/renderer_stub.cc
index ba0ffd8..c7c9f4c 100644
--- a/o3d/converter/cross/renderer_stub.cc
+++ b/o3d/converter/cross/renderer_stub.cc
@@ -211,10 +211,13 @@ const int* RendererStub::GetRGBAUByteNSwizzleTable() {
return swizzle_table;
}
+// TODO(fransiskusx): This violates the One Definition Rule.
+#if !defined(RENDERER_CAIRO)
// This is a factory function for creating Renderer objects. Since
// we're implementing a stub renderer, we only ever return a stub renderer.
Renderer* Renderer::CreateDefaultRenderer(ServiceLocator* service_locator) {
return RendererStub::CreateDefault(service_locator);
}
+#endif
} // namespace o3d