| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010, Google Inc. | 2 * Copyright 2010, 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // current platform. | 145 // current platform. |
| 146 virtual const int* GetRGBAUByteNSwizzleTable(); | 146 virtual const int* GetRGBAUByteNSwizzleTable(); |
| 147 | 147 |
| 148 // Overriden from Renderer | 148 // Overriden from Renderer |
| 149 void PushRenderStates(State* state); | 149 void PushRenderStates(State* state); |
| 150 | 150 |
| 151 // Overrider from Renderer | 151 // Overrider from Renderer |
| 152 void PopRenderStates(); | 152 void PopRenderStates(); |
| 153 | 153 |
| 154 protected: | 154 protected: |
| 155 typedef std::list<Layer::Ref> LayerRefList; | 155 typedef std::list<Layer*> LayerList; |
| 156 | 156 |
| 157 // Keep the constructor protected so only factory methods can create | 157 // Keep the constructor protected so only factory methods can create |
| 158 // renderers. | 158 // renderers. |
| 159 explicit RendererCairo(ServiceLocator* service_locator); | 159 explicit RendererCairo(ServiceLocator* service_locator); |
| 160 | 160 |
| 161 // Sets rendering to the back buffer. | 161 // Sets rendering to the back buffer. |
| 162 virtual void SetBackBufferPlatformSpecific(); | 162 virtual void SetBackBufferPlatformSpecific(); |
| 163 | 163 |
| 164 // Sets the render surfaces on a specific platform. | 164 // Sets the render surfaces on a specific platform. |
| 165 virtual void SetRenderSurfacesPlatformSpecific( | 165 virtual void SetRenderSurfacesPlatformSpecific( |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 // Sets the viewport. This is the platform specific version. | 213 // Sets the viewport. This is the platform specific version. |
| 214 virtual void SetViewportInPixels(int left, | 214 virtual void SetViewportInPixels(int left, |
| 215 int top, | 215 int top, |
| 216 int width, | 216 int width, |
| 217 int height, | 217 int height, |
| 218 float min_z, | 218 float min_z, |
| 219 float max_z); | 219 float max_z); |
| 220 | 220 |
| 221 // Mask the area of the current layer that will collide with other images. | 221 // Mask the area of the current layer that will collide with other images. |
| 222 void MaskArea(cairo_t* cr, LayerRefList::iterator it); | 222 void MaskArea(cairo_t* cr, LayerList::iterator it); |
| 223 | 223 |
| 224 // Paint the background with black color. | 224 // Paint the background with black color. |
| 225 // TODO(fransiskusx): Support changing the background color. | 225 // TODO(fransiskusx): Support changing the background color. |
| 226 void PaintBackground(cairo_t* cr); | 226 void PaintBackground(cairo_t* cr); |
| 227 | 227 |
| 228 // Linux Client Display | 228 // Linux Client Display |
| 229 Display* display_; | 229 Display* display_; |
| 230 // Linux Client Window | 230 // Linux Client Window |
| 231 Window window_; | 231 Window window_; |
| 232 | 232 |
| 233 // Main surface to render cairo | 233 // Main surface to render cairo |
| 234 cairo_surface_t* main_surface_; | 234 cairo_surface_t* main_surface_; |
| 235 | 235 |
| 236 // Draw the background | 236 // Draw the background |
| 237 cairo_t* bg_drawing_; | 237 cairo_t* bg_drawing_; |
| 238 | 238 |
| 239 // Array of Layer | 239 // Array of Layer |
| 240 LayerRefList layer_list_; | 240 LayerList layer_list_; |
| 241 }; | 241 }; |
| 242 | 242 |
| 243 } // namespace o2d | 243 } // namespace o2d |
| 244 | 244 |
| 245 } // namespace o3d | 245 } // namespace o3d |
| 246 | 246 |
| 247 #endif // O3D_CORE_CROSS_CAIRO_RENDERER_CAIRO_H_ | 247 #endif // O3D_CORE_CROSS_CAIRO_RENDERER_CAIRO_H_ |
| OLD | NEW |