Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: converter/cross/renderer_stub.cc

Issue 164130: This CL adds client.toDataURL which gets the contents... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « converter/cross/renderer_stub.h ('k') | core/cross/bitmap.h » ('j') | core/cross/bitmap_png.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698