OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011, Google Inc. | 2 * Copyright 2011, 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 23 matching lines...) Expand all Loading... |
34 #include "core/cross/cairo/renderer_cairo.h" | 34 #include "core/cross/cairo/renderer_cairo.h" |
35 #include <cairo-xlib.h> | 35 #include <cairo-xlib.h> |
36 #include <stdio.h> | 36 #include <stdio.h> |
37 #include <stdlib.h> | 37 #include <stdlib.h> |
38 #include <string.h> | 38 #include <string.h> |
39 #include "core/cross/cairo/layer.h" | 39 #include "core/cross/cairo/layer.h" |
40 #include "core/cross/cairo/texture_cairo.h" | 40 #include "core/cross/cairo/texture_cairo.h" |
41 | 41 |
42 namespace o3d { | 42 namespace o3d { |
43 | 43 |
| 44 // This is a factory function for creating 2D Renderer objects. |
| 45 Renderer* Renderer::Create2DRenderer(ServiceLocator* service_locator) { |
| 46 return o2d::RendererCairo::CreateDefault(service_locator); |
| 47 } |
| 48 |
44 namespace o2d { | 49 namespace o2d { |
45 | 50 |
46 RendererCairo::RendererCairo(ServiceLocator* service_locator) | 51 RendererCairo::RendererCairo(ServiceLocator* service_locator) |
47 : Renderer(service_locator), display_(NULL), main_surface_(NULL) { | 52 : Renderer(service_locator), display_(NULL), main_surface_(NULL) { |
48 // Don't need to do anything. | 53 // Don't need to do anything. |
49 } | 54 } |
50 | 55 |
51 RendererCairo::~RendererCairo() { | 56 RendererCairo::~RendererCairo() { |
52 Destroy(); | 57 Destroy(); |
53 } | 58 } |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 NOTIMPLEMENTED(); | 463 NOTIMPLEMENTED(); |
459 } | 464 } |
460 | 465 |
461 void RendererCairo::PopRenderStates() { | 466 void RendererCairo::PopRenderStates() { |
462 NOTIMPLEMENTED(); | 467 NOTIMPLEMENTED(); |
463 } | 468 } |
464 | 469 |
465 } // namespace o2d | 470 } // namespace o2d |
466 | 471 |
467 } // namespace o3d | 472 } // namespace o3d |
OLD | NEW |