1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CC_OUTPUT_GL_RENDERER_H_
6 #define CC_OUTPUT_GL_RENDERER_H_
8 #include "base/cancelable_callback.h"
9 #include "cc/base/cc_export.h"
10 #include "cc/base/scoped_ptr_deque.h"
11 #include "cc/base/scoped_ptr_vector.h"
12 #include "cc/output/direct_renderer.h"
13 #include "cc/output/gl_renderer_draw_cache.h"
14 #include "cc/output/program_binding.h"
15 #include "cc/output/renderer.h"
16 #include "cc/quads/debug_border_draw_quad.h"
17 #include "cc/quads/io_surface_draw_quad.h"
18 #include "cc/quads/render_pass_draw_quad.h"
19 #include "cc/quads/solid_color_draw_quad.h"
20 #include "cc/quads/tile_draw_quad.h"
21 #include "cc/quads/yuv_video_draw_quad.h"
22 #include "ui/gfx/geometry/quad_f.h"
34 class GLRendererShaderTest
;
36 class PictureDrawQuad
;
38 class StreamVideoDrawQuad
;
39 class TextureDrawQuad
;
40 class TextureMailboxDeleter
;
41 class StaticGeometryBinding
;
42 class DynamicGeometryBinding
;
43 class ScopedEnsureFramebufferAllocation
;
45 // Class that handles drawing of composited render layers using GL.
46 class CC_EXPORT GLRenderer
: public DirectRenderer
{
48 class ScopedUseGrContext
;
50 static scoped_ptr
<GLRenderer
> Create(
51 RendererClient
* client
,
52 const RendererSettings
* settings
,
53 OutputSurface
* output_surface
,
54 ResourceProvider
* resource_provider
,
55 TextureMailboxDeleter
* texture_mailbox_deleter
,
56 int highp_threshold_min
);
58 ~GLRenderer() override
;
60 const RendererCapabilitiesImpl
& Capabilities() const override
;
62 // Waits for rendering to finish.
63 void Finish() override
;
65 void DoNoOp() override
;
66 void SwapBuffers(const CompositorFrameMetadata
& metadata
) override
;
68 virtual bool IsContextLost();
71 GLRenderer(RendererClient
* client
,
72 const RendererSettings
* settings
,
73 OutputSurface
* output_surface
,
74 ResourceProvider
* resource_provider
,
75 TextureMailboxDeleter
* texture_mailbox_deleter
,
76 int highp_threshold_min
);
78 void DidChangeVisibility() override
;
80 bool IsBackbufferDiscarded() const { return is_backbuffer_discarded_
; }
82 const gfx::QuadF
& SharedGeometryQuad() const { return shared_geometry_quad_
; }
83 const StaticGeometryBinding
* SharedGeometry() const {
84 return shared_geometry_
.get();
87 void GetFramebufferPixelsAsync(const DrawingFrame
* frame
,
88 const gfx::Rect
& rect
,
89 scoped_ptr
<CopyOutputRequest
> request
);
90 void GetFramebufferTexture(unsigned texture_id
,
91 ResourceFormat texture_format
,
92 const gfx::Rect
& device_rect
);
93 void ReleaseRenderPassTextures();
94 enum BoundGeometry
{ NO_BINDING
, SHARED_BINDING
, CLIPPED_BINDING
};
95 void PrepareGeometry(BoundGeometry geometry_to_bind
);
96 void SetStencilEnabled(bool enabled
);
97 bool stencil_enabled() const { return stencil_shadow_
; }
98 void SetBlendEnabled(bool enabled
);
99 bool blend_enabled() const { return blend_shadow_
; }
101 void BindFramebufferToOutputSurface(DrawingFrame
* frame
) override
;
102 bool BindFramebufferToTexture(DrawingFrame
* frame
,
103 const ScopedResource
* resource
,
104 const gfx::Rect
& target_rect
) override
;
105 void SetScissorTestRect(const gfx::Rect
& scissor_rect
) override
;
106 void PrepareSurfaceForPass(DrawingFrame
* frame
,
107 SurfaceInitializationMode initialization_mode
,
108 const gfx::Rect
& render_pass_scissor
) override
;
109 void DoDrawQuad(DrawingFrame
* frame
,
110 const class DrawQuad
*,
111 const gfx::QuadF
* draw_region
) override
;
112 void BeginDrawingFrame(DrawingFrame
* frame
) override
;
113 void FinishDrawingFrame(DrawingFrame
* frame
) override
;
114 bool FlippedFramebuffer(const DrawingFrame
* frame
) const override
;
115 bool FlippedRootFramebuffer() const;
116 void EnsureScissorTestEnabled() override
;
117 void EnsureScissorTestDisabled() override
;
118 void CopyCurrentRenderPassToBitmap(
120 scoped_ptr
<CopyOutputRequest
> request
) override
;
121 void FinishDrawingQuadList() override
;
123 // Returns true if quad requires antialiasing and false otherwise.
124 static bool ShouldAntialiasQuad(const gfx::QuadF
& device_layer_quad
,
128 // Inflate the quad and fill edge array for fragment shader.
129 // |local_quad| is set to inflated quad. |edge| array is filled with
130 // inflated quad's edge data.
131 static void SetupQuadForClippingAndAntialiasing(
132 const gfx::Transform
& device_transform
,
133 const DrawQuad
* quad
,
134 const gfx::QuadF
* device_layer_quad
,
135 const gfx::QuadF
* clip_region
,
136 gfx::QuadF
* local_quad
,
138 static void SetupRenderPassQuadForClippingAndAntialiasing(
139 const gfx::Transform
& device_transform
,
140 const RenderPassDrawQuad
* quad
,
141 const gfx::QuadF
* device_layer_quad
,
142 const gfx::QuadF
* clip_region
,
143 gfx::QuadF
* local_quad
,
147 friend class GLRendererShaderPixelTest
;
148 friend class GLRendererShaderTest
;
150 static void ToGLMatrix(float* gl_matrix
, const gfx::Transform
& transform
);
152 void DiscardPixels();
153 void ClearFramebuffer(DrawingFrame
* frame
);
156 void DrawDebugBorderQuad(const DrawingFrame
* frame
,
157 const DebugBorderDrawQuad
* quad
);
158 static bool IsDefaultBlendMode(SkXfermode::Mode blend_mode
) {
159 return blend_mode
== SkXfermode::kSrcOver_Mode
;
161 bool CanApplyBlendModeUsingBlendFunc(SkXfermode::Mode blend_mode
);
162 void ApplyBlendModeUsingBlendFunc(SkXfermode::Mode blend_mode
);
163 void RestoreBlendFuncToDefault(SkXfermode::Mode blend_mode
);
165 gfx::Rect
GetBackdropBoundingBoxForRenderPassQuad(
167 const RenderPassDrawQuad
* quad
,
168 const gfx::Transform
& contents_device_transform
,
169 const gfx::QuadF
* clip_region
,
171 scoped_ptr
<ScopedResource
> GetBackdropTexture(const gfx::Rect
& bounding_rect
);
173 static bool ShouldApplyBackgroundFilters(const RenderPassDrawQuad
* quad
);
174 skia::RefPtr
<SkImage
> ApplyBackgroundFilters(
176 const RenderPassDrawQuad
* quad
,
177 ScopedResource
* background_texture
);
179 void DrawRenderPassQuad(DrawingFrame
* frame
,
180 const RenderPassDrawQuad
* quadi
,
181 const gfx::QuadF
* clip_region
);
182 void DrawSolidColorQuad(const DrawingFrame
* frame
,
183 const SolidColorDrawQuad
* quad
,
184 const gfx::QuadF
* clip_region
);
185 void DrawStreamVideoQuad(const DrawingFrame
* frame
,
186 const StreamVideoDrawQuad
* quad
,
187 const gfx::QuadF
* clip_region
);
188 void DrawTextureQuad(const DrawingFrame
* frame
,
189 const TextureDrawQuad
* quad
,
190 const gfx::QuadF
* clip_region
);
191 void EnqueueTextureQuad(const DrawingFrame
* frame
,
192 const TextureDrawQuad
* quad
,
193 const gfx::QuadF
* clip_region
);
194 void FlushTextureQuadCache(BoundGeometry flush_binding
);
195 void DrawIOSurfaceQuad(const DrawingFrame
* frame
,
196 const IOSurfaceDrawQuad
* quad
,
197 const gfx::QuadF
* clip_region
);
198 void DrawTileQuad(const DrawingFrame
* frame
,
199 const TileDrawQuad
* quad
,
200 const gfx::QuadF
* clip_region
);
201 void DrawContentQuad(const DrawingFrame
* frame
,
202 const ContentDrawQuadBase
* quad
,
203 ResourceId resource_id
,
204 const gfx::QuadF
* clip_region
);
205 void DrawContentQuadAA(const DrawingFrame
* frame
,
206 const ContentDrawQuadBase
* quad
,
207 ResourceId resource_id
,
208 const gfx::Transform
& device_transform
,
209 const gfx::QuadF
& aa_quad
,
210 const gfx::QuadF
* clip_region
);
211 void DrawContentQuadNoAA(const DrawingFrame
* frame
,
212 const ContentDrawQuadBase
* quad
,
213 ResourceId resource_id
,
214 const gfx::QuadF
* clip_region
);
215 void DrawYUVVideoQuad(const DrawingFrame
* frame
,
216 const YUVVideoDrawQuad
* quad
,
217 const gfx::QuadF
* clip_region
);
218 void DrawPictureQuad(const DrawingFrame
* frame
,
219 const PictureDrawQuad
* quad
,
220 const gfx::QuadF
* clip_region
);
222 void SetShaderOpacity(float opacity
, int alpha_location
);
223 void SetShaderQuadF(const gfx::QuadF
& quad
, int quad_location
);
224 void DrawQuadGeometryClippedByQuadF(const DrawingFrame
* frame
,
225 const gfx::Transform
& draw_transform
,
226 const gfx::RectF
& quad_rect
,
227 const gfx::QuadF
& clipping_region_quad
,
230 void DrawQuadGeometry(const DrawingFrame
* frame
,
231 const gfx::Transform
& draw_transform
,
232 const gfx::RectF
& quad_rect
,
233 int matrix_location
);
234 void SetUseProgram(unsigned program
);
236 bool UseScopedTexture(DrawingFrame
* frame
,
237 const ScopedResource
* resource
,
238 const gfx::Rect
& viewport_rect
);
240 bool MakeContextCurrent();
242 void InitializeSharedObjects();
243 void CleanupSharedObjects();
245 typedef base::Callback
<void(scoped_ptr
<CopyOutputRequest
> copy_request
,
247 AsyncGetFramebufferPixelsCleanupCallback
;
248 void FinishedReadback(unsigned source_buffer
,
250 const gfx::Size
& size
);
252 void ReinitializeGLState();
253 void RestoreGLState();
254 void RestoreFramebuffer(DrawingFrame
* frame
);
256 void DiscardBackbuffer() override
;
257 void EnsureBackbuffer() override
;
258 void EnforceMemoryPolicy();
260 void ScheduleOverlays(DrawingFrame
* frame
);
262 typedef ScopedPtrVector
<ResourceProvider::ScopedReadLockGL
>
263 OverlayResourceLockList
;
264 OverlayResourceLockList pending_overlay_resources_
;
265 OverlayResourceLockList in_use_overlay_resources_
;
267 RendererCapabilitiesImpl capabilities_
;
269 unsigned offscreen_framebuffer_id_
;
271 scoped_ptr
<StaticGeometryBinding
> shared_geometry_
;
272 scoped_ptr
<DynamicGeometryBinding
> clipped_geometry_
;
273 gfx::QuadF shared_geometry_quad_
;
275 // This block of bindings defines all of the programs used by the compositor
276 // itself. Add any new programs here to GLRendererShaderTest.
278 // Tiled layer shaders.
279 typedef ProgramBinding
<VertexShaderTile
, FragmentShaderRGBATexAlpha
>
281 typedef ProgramBinding
<VertexShaderTileAA
, FragmentShaderRGBATexClampAlphaAA
>
283 typedef ProgramBinding
<VertexShaderTileAA
,
284 FragmentShaderRGBATexClampSwizzleAlphaAA
>
285 TileProgramSwizzleAA
;
286 typedef ProgramBinding
<VertexShaderTile
, FragmentShaderRGBATexOpaque
>
288 typedef ProgramBinding
<VertexShaderTile
, FragmentShaderRGBATexSwizzleAlpha
>
290 typedef ProgramBinding
<VertexShaderTile
, FragmentShaderRGBATexSwizzleOpaque
>
291 TileProgramSwizzleOpaque
;
294 typedef ProgramBinding
<VertexShaderPosTexTransform
,
295 FragmentShaderRGBATexVaryingAlpha
> TextureProgram
;
296 typedef ProgramBinding
<VertexShaderPosTexTransform
,
297 FragmentShaderRGBATexPremultiplyAlpha
>
298 NonPremultipliedTextureProgram
;
299 typedef ProgramBinding
<VertexShaderPosTexTransform
,
300 FragmentShaderTexBackgroundVaryingAlpha
>
301 TextureBackgroundProgram
;
302 typedef ProgramBinding
<VertexShaderPosTexTransform
,
303 FragmentShaderTexBackgroundPremultiplyAlpha
>
304 NonPremultipliedTextureBackgroundProgram
;
306 // Render surface shaders.
307 typedef ProgramBinding
<VertexShaderPosTexTransform
,
308 FragmentShaderRGBATexAlpha
> RenderPassProgram
;
309 typedef ProgramBinding
<VertexShaderPosTexTransform
,
310 FragmentShaderRGBATexAlphaMask
> RenderPassMaskProgram
;
311 typedef ProgramBinding
<VertexShaderQuadTexTransformAA
,
312 FragmentShaderRGBATexAlphaAA
> RenderPassProgramAA
;
313 typedef ProgramBinding
<VertexShaderQuadTexTransformAA
,
314 FragmentShaderRGBATexAlphaMaskAA
>
315 RenderPassMaskProgramAA
;
316 typedef ProgramBinding
<VertexShaderPosTexTransform
,
317 FragmentShaderRGBATexColorMatrixAlpha
>
318 RenderPassColorMatrixProgram
;
319 typedef ProgramBinding
<VertexShaderQuadTexTransformAA
,
320 FragmentShaderRGBATexAlphaMaskColorMatrixAA
>
321 RenderPassMaskColorMatrixProgramAA
;
322 typedef ProgramBinding
<VertexShaderQuadTexTransformAA
,
323 FragmentShaderRGBATexAlphaColorMatrixAA
>
324 RenderPassColorMatrixProgramAA
;
325 typedef ProgramBinding
<VertexShaderPosTexTransform
,
326 FragmentShaderRGBATexAlphaMaskColorMatrix
>
327 RenderPassMaskColorMatrixProgram
;
330 typedef ProgramBinding
<VertexShaderVideoTransform
, FragmentShaderRGBATex
>
331 VideoStreamTextureProgram
;
332 typedef ProgramBinding
<VertexShaderPosTexYUVStretchOffset
,
333 FragmentShaderYUVVideo
> VideoYUVProgram
;
334 typedef ProgramBinding
<VertexShaderPosTexYUVStretchOffset
,
335 FragmentShaderYUVAVideo
> VideoYUVAProgram
;
337 // Special purpose / effects shaders.
338 typedef ProgramBinding
<VertexShaderPos
, FragmentShaderColor
>
340 typedef ProgramBinding
<VertexShaderQuad
, FragmentShaderColor
>
342 typedef ProgramBinding
<VertexShaderQuadAA
, FragmentShaderColorAA
>
345 const TileProgram
* GetTileProgram(
346 TexCoordPrecision precision
, SamplerType sampler
);
347 const TileProgramOpaque
* GetTileProgramOpaque(
348 TexCoordPrecision precision
, SamplerType sampler
);
349 const TileProgramAA
* GetTileProgramAA(
350 TexCoordPrecision precision
, SamplerType sampler
);
351 const TileProgramSwizzle
* GetTileProgramSwizzle(
352 TexCoordPrecision precision
, SamplerType sampler
);
353 const TileProgramSwizzleOpaque
* GetTileProgramSwizzleOpaque(
354 TexCoordPrecision precision
, SamplerType sampler
);
355 const TileProgramSwizzleAA
* GetTileProgramSwizzleAA(
356 TexCoordPrecision precision
, SamplerType sampler
);
358 const RenderPassProgram
* GetRenderPassProgram(TexCoordPrecision precision
,
359 BlendMode blend_mode
);
360 const RenderPassProgramAA
* GetRenderPassProgramAA(TexCoordPrecision precision
,
361 BlendMode blend_mode
);
362 const RenderPassMaskProgram
* GetRenderPassMaskProgram(
363 TexCoordPrecision precision
,
365 BlendMode blend_mode
,
366 bool mask_for_background
);
367 const RenderPassMaskProgramAA
* GetRenderPassMaskProgramAA(
368 TexCoordPrecision precision
,
370 BlendMode blend_mode
,
371 bool mask_for_background
);
372 const RenderPassColorMatrixProgram
* GetRenderPassColorMatrixProgram(
373 TexCoordPrecision precision
,
374 BlendMode blend_mode
);
375 const RenderPassColorMatrixProgramAA
* GetRenderPassColorMatrixProgramAA(
376 TexCoordPrecision precision
,
377 BlendMode blend_mode
);
378 const RenderPassMaskColorMatrixProgram
* GetRenderPassMaskColorMatrixProgram(
379 TexCoordPrecision precision
,
381 BlendMode blend_mode
,
382 bool mask_for_background
);
383 const RenderPassMaskColorMatrixProgramAA
*
384 GetRenderPassMaskColorMatrixProgramAA(TexCoordPrecision precision
,
386 BlendMode blend_mode
,
387 bool mask_for_background
);
389 const TextureProgram
* GetTextureProgram(TexCoordPrecision precision
,
390 SamplerType sampler
);
391 const NonPremultipliedTextureProgram
* GetNonPremultipliedTextureProgram(
392 TexCoordPrecision precision
,
393 SamplerType sampler
);
394 const TextureBackgroundProgram
* GetTextureBackgroundProgram(
395 TexCoordPrecision precision
,
396 SamplerType sampler
);
397 const NonPremultipliedTextureBackgroundProgram
*
398 GetNonPremultipliedTextureBackgroundProgram(TexCoordPrecision precision
,
399 SamplerType sampler
);
400 const TextureProgram
* GetTextureIOSurfaceProgram(
401 TexCoordPrecision precision
);
403 const VideoYUVProgram
* GetVideoYUVProgram(TexCoordPrecision precision
,
404 SamplerType sampler
);
405 const VideoYUVAProgram
* GetVideoYUVAProgram(TexCoordPrecision precision
,
406 SamplerType sampler
);
407 const VideoStreamTextureProgram
* GetVideoStreamTextureProgram(
408 TexCoordPrecision precision
);
410 const DebugBorderProgram
* GetDebugBorderProgram();
411 const SolidColorProgram
* GetSolidColorProgram();
412 const SolidColorProgramAA
* GetSolidColorProgramAA();
415 tile_program_
[LAST_TEX_COORD_PRECISION
+ 1][LAST_SAMPLER_TYPE
+ 1];
417 tile_program_opaque_
[LAST_TEX_COORD_PRECISION
+ 1][LAST_SAMPLER_TYPE
+ 1];
419 tile_program_aa_
[LAST_TEX_COORD_PRECISION
+ 1][LAST_SAMPLER_TYPE
+ 1];
420 TileProgramSwizzle tile_program_swizzle_
[LAST_TEX_COORD_PRECISION
+
421 1][LAST_SAMPLER_TYPE
+ 1];
422 TileProgramSwizzleOpaque
423 tile_program_swizzle_opaque_
[LAST_TEX_COORD_PRECISION
+
424 1][LAST_SAMPLER_TYPE
+ 1];
425 TileProgramSwizzleAA tile_program_swizzle_aa_
[LAST_TEX_COORD_PRECISION
+
426 1][LAST_SAMPLER_TYPE
+ 1];
429 texture_program_
[LAST_TEX_COORD_PRECISION
+ 1][LAST_SAMPLER_TYPE
+ 1];
430 NonPremultipliedTextureProgram
431 nonpremultiplied_texture_program_
[LAST_TEX_COORD_PRECISION
+
432 1][LAST_SAMPLER_TYPE
+ 1];
433 TextureBackgroundProgram
434 texture_background_program_
[LAST_TEX_COORD_PRECISION
+
435 1][LAST_SAMPLER_TYPE
+ 1];
436 NonPremultipliedTextureBackgroundProgram
437 nonpremultiplied_texture_background_program_
[LAST_TEX_COORD_PRECISION
+
438 1][LAST_SAMPLER_TYPE
+ 1];
439 TextureProgram texture_io_surface_program_
[LAST_TEX_COORD_PRECISION
+ 1];
442 render_pass_program_
[LAST_TEX_COORD_PRECISION
+ 1][LAST_BLEND_MODE
+ 1];
443 RenderPassProgramAA render_pass_program_aa_
[LAST_TEX_COORD_PRECISION
+
444 1][LAST_BLEND_MODE
+ 1];
445 RenderPassMaskProgram
446 render_pass_mask_program_
[LAST_TEX_COORD_PRECISION
+ 1]
447 [LAST_SAMPLER_TYPE
+ 1]
448 [LAST_BLEND_MODE
+ 1]
449 [LAST_MASK_VALUE
+ 1];
450 RenderPassMaskProgramAA
451 render_pass_mask_program_aa_
[LAST_TEX_COORD_PRECISION
+ 1]
452 [LAST_SAMPLER_TYPE
+ 1]
453 [LAST_BLEND_MODE
+ 1]
454 [LAST_MASK_VALUE
+ 1];
455 RenderPassColorMatrixProgram
456 render_pass_color_matrix_program_
[LAST_TEX_COORD_PRECISION
+
457 1][LAST_BLEND_MODE
+ 1];
458 RenderPassColorMatrixProgramAA
459 render_pass_color_matrix_program_aa_
[LAST_TEX_COORD_PRECISION
+
460 1][LAST_BLEND_MODE
+ 1];
461 RenderPassMaskColorMatrixProgram
462 render_pass_mask_color_matrix_program_
[LAST_TEX_COORD_PRECISION
+ 1]
463 [LAST_SAMPLER_TYPE
+ 1]
464 [LAST_BLEND_MODE
+ 1]
465 [LAST_MASK_VALUE
+ 1];
466 RenderPassMaskColorMatrixProgramAA
467 render_pass_mask_color_matrix_program_aa_
[LAST_TEX_COORD_PRECISION
+ 1]
468 [LAST_SAMPLER_TYPE
+ 1]
469 [LAST_BLEND_MODE
+ 1]
470 [LAST_MASK_VALUE
+ 1];
473 video_yuv_program_
[LAST_TEX_COORD_PRECISION
+ 1][LAST_SAMPLER_TYPE
+ 1];
475 video_yuva_program_
[LAST_TEX_COORD_PRECISION
+ 1][LAST_SAMPLER_TYPE
+ 1];
476 VideoStreamTextureProgram
477 video_stream_texture_program_
[LAST_TEX_COORD_PRECISION
+ 1];
479 DebugBorderProgram debug_border_program_
;
480 SolidColorProgram solid_color_program_
;
481 SolidColorProgramAA solid_color_program_aa_
;
483 gpu::gles2::GLES2Interface
* gl_
;
484 gpu::ContextSupport
* context_support_
;
486 TextureMailboxDeleter
* texture_mailbox_deleter_
;
488 gfx::Rect swap_buffer_rect_
;
489 gfx::Rect scissor_rect_
;
490 bool is_backbuffer_discarded_
;
491 bool is_using_bind_uniform_
;
492 bool is_scissor_enabled_
;
493 bool scissor_rect_needs_reset_
;
494 bool stencil_shadow_
;
496 unsigned program_shadow_
;
497 TexturedQuadDrawCache draw_cache_
;
498 int highp_threshold_min_
;
499 int highp_threshold_cache_
;
501 struct PendingAsyncReadPixels
;
502 ScopedPtrVector
<PendingAsyncReadPixels
> pending_async_read_pixels_
;
504 scoped_ptr
<ResourceProvider::ScopedWriteLockGL
> current_framebuffer_lock_
;
507 ScopedPtrDeque
<SyncQuery
> pending_sync_queries_
;
508 ScopedPtrDeque
<SyncQuery
> available_sync_queries_
;
509 scoped_ptr
<SyncQuery
> current_sync_query_
;
510 bool use_sync_query_
;
511 bool use_blend_equation_advanced_
;
512 bool use_blend_equation_advanced_coherent_
;
514 SkBitmap on_demand_tile_raster_bitmap_
;
515 ResourceId on_demand_tile_raster_resource_id_
;
516 BoundGeometry bound_geometry_
;
517 DISALLOW_COPY_AND_ASSIGN(GLRenderer
);
522 #endif // CC_OUTPUT_GL_RENDERER_H_