| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #include "core/cross/service_locator.h" | 39 #include "core/cross/service_locator.h" |
| 40 #include "converter/cross/buffer_stub.h" | 40 #include "converter/cross/buffer_stub.h" |
| 41 #include "converter/cross/draw_element_stub.h" | 41 #include "converter/cross/draw_element_stub.h" |
| 42 #include "converter/cross/effect_stub.h" | 42 #include "converter/cross/effect_stub.h" |
| 43 #include "converter/cross/param_cache_stub.h" | 43 #include "converter/cross/param_cache_stub.h" |
| 44 #include "converter/cross/primitive_stub.h" | 44 #include "converter/cross/primitive_stub.h" |
| 45 #include "converter/cross/render_surface_stub.h" | 45 #include "converter/cross/render_surface_stub.h" |
| 46 #include "converter/cross/sampler_stub.h" | 46 #include "converter/cross/sampler_stub.h" |
| 47 #include "converter/cross/stream_bank_stub.h" | 47 #include "converter/cross/stream_bank_stub.h" |
| 48 #include "converter/cross/texture_stub.h" | 48 #include "converter/cross/texture_stub.h" |
| 49 #include "utils/cross/dataurl.h" |
| 49 | 50 |
| 50 namespace o3d { | 51 namespace o3d { |
| 51 | 52 |
| 52 Renderer* RendererStub::CreateDefault(ServiceLocator* service_locator) { | 53 Renderer* RendererStub::CreateDefault(ServiceLocator* service_locator) { |
| 53 return new RendererStub(service_locator); | 54 return new RendererStub(service_locator); |
| 54 } | 55 } |
| 55 | 56 |
| 56 RendererStub::RendererStub(ServiceLocator* service_locator) | 57 RendererStub::RendererStub(ServiceLocator* service_locator) |
| 57 : Renderer(service_locator) { | 58 : Renderer(service_locator) { |
| 58 } | 59 } |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 int width, | 190 int width, |
| 190 int height) { | 191 int height) { |
| 191 return RenderDepthStencilSurface::Ref( | 192 return RenderDepthStencilSurface::Ref( |
| 192 new RenderDepthStencilSurfaceStub(service_locator(), width, height)); | 193 new RenderDepthStencilSurfaceStub(service_locator(), width, height)); |
| 193 } | 194 } |
| 194 | 195 |
| 195 StreamBank::Ref RendererStub::CreateStreamBank() { | 196 StreamBank::Ref RendererStub::CreateStreamBank() { |
| 196 return StreamBank::Ref(new StreamBankStub(service_locator())); | 197 return StreamBank::Ref(new StreamBankStub(service_locator())); |
| 197 } | 198 } |
| 198 | 199 |
| 199 bool RendererStub::SaveScreen(const String &) { | 200 String RendererStub::ToDataURL() { |
| 200 DCHECK(false); | 201 DCHECK(false); |
| 201 return true; | 202 return dataurl::kEmptyDataURL; |
| 202 } | 203 } |
| 203 | 204 |
| 204 ParamCache *RendererStub::CreatePlatformSpecificParamCache(void) { | 205 ParamCache *RendererStub::CreatePlatformSpecificParamCache(void) { |
| 205 return new ParamCacheStub; | 206 return new ParamCacheStub; |
| 206 } | 207 } |
| 207 | 208 |
| 208 void RendererStub::SetViewportInPixels(int, int, int, int, float, float) { | 209 void RendererStub::SetViewportInPixels(int, int, int, int, float, float) { |
| 209 DCHECK(false); | 210 DCHECK(false); |
| 210 } | 211 } |
| 211 | 212 |
| 212 const int* RendererStub::GetRGBAUByteNSwizzleTable() { | 213 const int* RendererStub::GetRGBAUByteNSwizzleTable() { |
| 213 static int swizzle_table[] = { 0, 1, 2, 3, }; | 214 static int swizzle_table[] = { 0, 1, 2, 3, }; |
| 214 return swizzle_table; | 215 return swizzle_table; |
| 215 } | 216 } |
| 216 | 217 |
| 217 // This is a factory function for creating Renderer objects. Since | 218 // This is a factory function for creating Renderer objects. Since |
| 218 // we're implementing a stub renderer, we only ever return a stub renderer. | 219 // we're implementing a stub renderer, we only ever return a stub renderer. |
| 219 Renderer* Renderer::CreateDefaultRenderer(ServiceLocator* service_locator) { | 220 Renderer* Renderer::CreateDefaultRenderer(ServiceLocator* service_locator) { |
| 220 return RendererStub::CreateDefault(service_locator); | 221 return RendererStub::CreateDefault(service_locator); |
| 221 } | 222 } |
| 222 | 223 |
| 223 } // namespace o3d | 224 } // namespace o3d |
| OLD | NEW |