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

Side by Side Diff: core/cross/command_buffer/renderer_cb.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 29 matching lines...) Expand all
40 #include "core/cross/command_buffer/buffer_cb.h" 40 #include "core/cross/command_buffer/buffer_cb.h"
41 #include "core/cross/command_buffer/effect_cb.h" 41 #include "core/cross/command_buffer/effect_cb.h"
42 #include "core/cross/command_buffer/param_cache_cb.h" 42 #include "core/cross/command_buffer/param_cache_cb.h"
43 #include "core/cross/command_buffer/primitive_cb.h" 43 #include "core/cross/command_buffer/primitive_cb.h"
44 #include "core/cross/command_buffer/renderer_cb.h" 44 #include "core/cross/command_buffer/renderer_cb.h"
45 #include "core/cross/command_buffer/sampler_cb.h" 45 #include "core/cross/command_buffer/sampler_cb.h"
46 #include "core/cross/command_buffer/states_cb.h" 46 #include "core/cross/command_buffer/states_cb.h"
47 #include "core/cross/command_buffer/stream_bank_cb.h" 47 #include "core/cross/command_buffer/stream_bank_cb.h"
48 #include "core/cross/command_buffer/texture_cb.h" 48 #include "core/cross/command_buffer/texture_cb.h"
49 #include "core/cross/renderer_platform.h" 49 #include "core/cross/renderer_platform.h"
50 #include "utils/cross/dataurl.h"
50 51
51 #ifdef OS_WIN 52 #ifdef OS_WIN
52 #include "core/win/command_buffer/win32_cb_server.h" 53 #include "core/win/command_buffer/win32_cb_server.h"
53 #endif 54 #endif
54 55
55 namespace o3d { 56 namespace o3d {
56 using command_buffer::GAPIInterface; 57 using command_buffer::GAPIInterface;
57 using command_buffer::CommandBufferHelper; 58 using command_buffer::CommandBufferHelper;
58 59
59 RendererCB::RendererCB(ServiceLocator* service_locator, 60 RendererCB::RendererCB(ServiceLocator* service_locator,
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 command_buffer::CommandBufferEntry args[6]; 362 command_buffer::CommandBufferEntry args[6];
362 args[0].value_uint32 = left; 363 args[0].value_uint32 = left;
363 args[1].value_uint32 = top; 364 args[1].value_uint32 = top;
364 args[2].value_uint32 = width; 365 args[2].value_uint32 = width;
365 args[3].value_uint32 = height; 366 args[3].value_uint32 = height;
366 args[4].value_float = min_z; 367 args[4].value_float = min_z;
367 args[5].value_float = max_z; 368 args[5].value_float = max_z;
368 helper_->AddCommand(command_buffer::SET_VIEWPORT, 6, args); 369 helper_->AddCommand(command_buffer::SET_VIEWPORT, 6, args);
369 } 370 }
370 371
371 bool RendererCB::SaveScreen(const String& file_name) { 372 String RendererCB::ToDataURL() {
372 // TODO 373 // TODO
373 return false; 374 return dataurl::kEmptyDataURL;
374 } 375 }
375 376
376 const int* RendererCB::GetRGBAUByteNSwizzleTable() { 377 const int* RendererCB::GetRGBAUByteNSwizzleTable() {
377 static int swizzle_table[] = { 0, 1, 2, 3, }; 378 static int swizzle_table[] = { 0, 1, 2, 3, };
378 return swizzle_table; 379 return swizzle_table;
379 } 380 }
380 381
381 // This is a factory function for creating Renderer objects. Since 382 // This is a factory function for creating Renderer objects. Since
382 // we're implementing command buffers, we only ever return a CB renderer. 383 // we're implementing command buffers, we only ever return a CB renderer.
383 Renderer* Renderer::CreateDefaultRenderer(ServiceLocator* service_locator) { 384 Renderer* Renderer::CreateDefaultRenderer(ServiceLocator* service_locator) {
384 return RendererCB::CreateDefault(service_locator); 385 return RendererCB::CreateDefault(service_locator);
385 } 386 }
386 } // namespace o3d 387 } // namespace o3d
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698