Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_OUTPUT_GL_RENDERER_H_ | 5 #ifndef CC_OUTPUT_GL_RENDERER_H_ |
| 6 #define CC_OUTPUT_GL_RENDERER_H_ | 6 #define CC_OUTPUT_GL_RENDERER_H_ |
| 7 | 7 |
| 8 #include "cc/base/cc_export.h" | 8 #include "cc/base/cc_export.h" |
| 9 #include "cc/output/direct_renderer.h" | 9 #include "cc/output/direct_renderer.h" |
| 10 #include "cc/output/gl_renderer_draw_cache.h" | 10 #include "cc/output/gl_renderer_draw_cache.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 137 const TextureDrawQuad* quad); | 137 const TextureDrawQuad* quad); |
| 138 void FlushTextureQuadCache(); | 138 void FlushTextureQuadCache(); |
| 139 void DrawIOSurfaceQuad(const DrawingFrame* frame, | 139 void DrawIOSurfaceQuad(const DrawingFrame* frame, |
| 140 const IOSurfaceDrawQuad* quad); | 140 const IOSurfaceDrawQuad* quad); |
| 141 void DrawTileQuad(const DrawingFrame* frame, const TileDrawQuad* quad); | 141 void DrawTileQuad(const DrawingFrame* frame, const TileDrawQuad* quad); |
| 142 void DrawContentQuad(const DrawingFrame* frame, | 142 void DrawContentQuad(const DrawingFrame* frame, |
| 143 const ContentDrawQuadBase* quad, | 143 const ContentDrawQuadBase* quad, |
| 144 ResourceProvider::ResourceId resource_id); | 144 ResourceProvider::ResourceId resource_id); |
| 145 void DrawYUVVideoQuad(const DrawingFrame* frame, | 145 void DrawYUVVideoQuad(const DrawingFrame* frame, |
| 146 const YUVVideoDrawQuad* quad); | 146 const YUVVideoDrawQuad* quad); |
| 147 void DrawYUVAVideoQuad(const DrawingFrame* frame, | |
| 148 const YUVVideoDrawQuad* quad); | |
| 147 void DrawPictureQuad(const DrawingFrame* frame, | 149 void DrawPictureQuad(const DrawingFrame* frame, |
| 148 const PictureDrawQuad* quad); | 150 const PictureDrawQuad* quad); |
| 149 | 151 |
| 150 void SetShaderOpacity(float opacity, int alpha_location); | 152 void SetShaderOpacity(float opacity, int alpha_location); |
| 151 void SetShaderQuadF(const gfx::QuadF& quad, int quad_location); | 153 void SetShaderQuadF(const gfx::QuadF& quad, int quad_location); |
| 152 void DrawQuadGeometry(const DrawingFrame* frame, | 154 void DrawQuadGeometry(const DrawingFrame* frame, |
| 153 const gfx::Transform& draw_transform, | 155 const gfx::Transform& draw_transform, |
| 154 const gfx::RectF& quad_rect, | 156 const gfx::RectF& quad_rect, |
| 155 int matrix_location); | 157 int matrix_location); |
| 156 void SetBlendEnabled(bool enabled); | 158 void SetBlendEnabled(bool enabled); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 243 typedef ProgramBinding<VertexShaderPosTexTransform, | 245 typedef ProgramBinding<VertexShaderPosTexTransform, |
| 244 FragmentShaderRGBATexRectVaryingAlpha> | 246 FragmentShaderRGBATexRectVaryingAlpha> |
| 245 TextureIOSurfaceProgram; | 247 TextureIOSurfaceProgram; |
| 246 | 248 |
| 247 // Video shaders. | 249 // Video shaders. |
| 248 typedef ProgramBinding<VertexShaderVideoTransform, | 250 typedef ProgramBinding<VertexShaderVideoTransform, |
| 249 FragmentShaderOESImageExternal> | 251 FragmentShaderOESImageExternal> |
| 250 VideoStreamTextureProgram; | 252 VideoStreamTextureProgram; |
| 251 typedef ProgramBinding<VertexShaderPosTexYUVStretch, FragmentShaderYUVVideo> | 253 typedef ProgramBinding<VertexShaderPosTexYUVStretch, FragmentShaderYUVVideo> |
| 252 VideoYUVProgram; | 254 VideoYUVProgram; |
| 255 typedef ProgramBinding<VertexShaderPosTexYUVStretch, FragmentShaderYUVAVideo> | |
| 256 VideoYUVAProgram; | |
| 253 | 257 |
| 254 // Special purpose / effects shaders. | 258 // Special purpose / effects shaders. |
| 255 typedef ProgramBinding<VertexShaderPos, FragmentShaderColor> | 259 typedef ProgramBinding<VertexShaderPos, FragmentShaderColor> |
| 256 DebugBorderProgram; | 260 DebugBorderProgram; |
| 257 typedef ProgramBinding<VertexShaderQuad, FragmentShaderColor> | 261 typedef ProgramBinding<VertexShaderQuad, FragmentShaderColor> |
| 258 SolidColorProgram; | 262 SolidColorProgram; |
| 259 typedef ProgramBinding<VertexShaderQuad, FragmentShaderColorAA> | 263 typedef ProgramBinding<VertexShaderQuad, FragmentShaderColorAA> |
| 260 SolidColorProgramAA; | 264 SolidColorProgramAA; |
| 261 | 265 |
| 262 const TileProgram* GetTileProgram(); | 266 const TileProgram* GetTileProgram(); |
| 263 const TileProgramOpaque* GetTileProgramOpaque(); | 267 const TileProgramOpaque* GetTileProgramOpaque(); |
| 264 const TileProgramAA* GetTileProgramAA(); | 268 const TileProgramAA* GetTileProgramAA(); |
| 265 const TileProgramSwizzle* GetTileProgramSwizzle(); | 269 const TileProgramSwizzle* GetTileProgramSwizzle(); |
| 266 const TileProgramSwizzleOpaque* GetTileProgramSwizzleOpaque(); | 270 const TileProgramSwizzleOpaque* GetTileProgramSwizzleOpaque(); |
| 267 const TileProgramSwizzleAA* GetTileProgramSwizzleAA(); | 271 const TileProgramSwizzleAA* GetTileProgramSwizzleAA(); |
| 268 const TileCheckerboardProgram* GetTileCheckerboardProgram(); | 272 const TileCheckerboardProgram* GetTileCheckerboardProgram(); |
| 269 | 273 |
| 270 const RenderPassProgram* GetRenderPassProgram(); | 274 const RenderPassProgram* GetRenderPassProgram(); |
| 271 const RenderPassProgramAA* GetRenderPassProgramAA(); | 275 const RenderPassProgramAA* GetRenderPassProgramAA(); |
| 272 const RenderPassMaskProgram* GetRenderPassMaskProgram(); | 276 const RenderPassMaskProgram* GetRenderPassMaskProgram(); |
| 273 const RenderPassMaskProgramAA* GetRenderPassMaskProgramAA(); | 277 const RenderPassMaskProgramAA* GetRenderPassMaskProgramAA(); |
| 274 | 278 |
| 275 const TextureProgram* GetTextureProgram(); | 279 const TextureProgram* GetTextureProgram(); |
| 276 const TextureProgramFlip* GetTextureProgramFlip(); | 280 const TextureProgramFlip* GetTextureProgramFlip(); |
| 277 const TextureIOSurfaceProgram* GetTextureIOSurfaceProgram(); | 281 const TextureIOSurfaceProgram* GetTextureIOSurfaceProgram(); |
| 278 | 282 |
| 279 const VideoYUVProgram* GetVideoYUVProgram(); | 283 const VideoYUVProgram* GetVideoYUVProgram(); |
| 284 const VideoYUVAProgram* GetVideoYUVAProgram(); | |
|
danakj
2013/04/03 00:42:04
By the way, when adding a new program, please add
vignesh
2013/04/04 00:37:33
Done.
| |
| 280 const VideoStreamTextureProgram* GetVideoStreamTextureProgram(); | 285 const VideoStreamTextureProgram* GetVideoStreamTextureProgram(); |
| 281 | 286 |
| 282 const DebugBorderProgram* GetDebugBorderProgram(); | 287 const DebugBorderProgram* GetDebugBorderProgram(); |
| 283 const SolidColorProgram* GetSolidColorProgram(); | 288 const SolidColorProgram* GetSolidColorProgram(); |
| 284 const SolidColorProgramAA* GetSolidColorProgramAA(); | 289 const SolidColorProgramAA* GetSolidColorProgramAA(); |
| 285 | 290 |
| 286 scoped_ptr<TileProgram> tile_program_; | 291 scoped_ptr<TileProgram> tile_program_; |
| 287 scoped_ptr<TileProgramOpaque> tile_program_opaque_; | 292 scoped_ptr<TileProgramOpaque> tile_program_opaque_; |
| 288 scoped_ptr<TileProgramAA> tile_program_aa_; | 293 scoped_ptr<TileProgramAA> tile_program_aa_; |
| 289 scoped_ptr<TileProgramSwizzle> tile_program_swizzle_; | 294 scoped_ptr<TileProgramSwizzle> tile_program_swizzle_; |
| 290 scoped_ptr<TileProgramSwizzleOpaque> tile_program_swizzle_opaque_; | 295 scoped_ptr<TileProgramSwizzleOpaque> tile_program_swizzle_opaque_; |
| 291 scoped_ptr<TileProgramSwizzleAA> tile_program_swizzle_aa_; | 296 scoped_ptr<TileProgramSwizzleAA> tile_program_swizzle_aa_; |
| 292 scoped_ptr<TileCheckerboardProgram> tile_checkerboard_program_; | 297 scoped_ptr<TileCheckerboardProgram> tile_checkerboard_program_; |
| 293 | 298 |
| 294 scoped_ptr<RenderPassProgram> render_pass_program_; | 299 scoped_ptr<RenderPassProgram> render_pass_program_; |
| 295 scoped_ptr<RenderPassProgramAA> render_pass_program_aa_; | 300 scoped_ptr<RenderPassProgramAA> render_pass_program_aa_; |
| 296 scoped_ptr<RenderPassMaskProgram> render_pass_mask_program_; | 301 scoped_ptr<RenderPassMaskProgram> render_pass_mask_program_; |
| 297 scoped_ptr<RenderPassMaskProgramAA> render_pass_mask_program_aa_; | 302 scoped_ptr<RenderPassMaskProgramAA> render_pass_mask_program_aa_; |
| 298 | 303 |
| 299 scoped_ptr<TextureProgram> texture_program_; | 304 scoped_ptr<TextureProgram> texture_program_; |
| 300 scoped_ptr<TextureProgramFlip> texture_program_flip_; | 305 scoped_ptr<TextureProgramFlip> texture_program_flip_; |
| 301 scoped_ptr<TextureIOSurfaceProgram> texture_io_surface_program_; | 306 scoped_ptr<TextureIOSurfaceProgram> texture_io_surface_program_; |
| 302 | 307 |
| 303 scoped_ptr<VideoYUVProgram> video_yuv_program_; | 308 scoped_ptr<VideoYUVProgram> video_yuv_program_; |
| 309 scoped_ptr<VideoYUVAProgram> video_yuva_program_; | |
| 304 scoped_ptr<VideoStreamTextureProgram> video_stream_texture_program_; | 310 scoped_ptr<VideoStreamTextureProgram> video_stream_texture_program_; |
| 305 | 311 |
| 306 scoped_ptr<DebugBorderProgram> debug_border_program_; | 312 scoped_ptr<DebugBorderProgram> debug_border_program_; |
| 307 scoped_ptr<SolidColorProgram> solid_color_program_; | 313 scoped_ptr<SolidColorProgram> solid_color_program_; |
| 308 scoped_ptr<SolidColorProgramAA> solid_color_program_aa_; | 314 scoped_ptr<SolidColorProgramAA> solid_color_program_aa_; |
| 309 | 315 |
| 310 OutputSurface* output_surface_; | 316 OutputSurface* output_surface_; |
| 311 WebKit::WebGraphicsContext3D* context_; | 317 WebKit::WebGraphicsContext3D* context_; |
| 312 | 318 |
| 313 gfx::Rect swap_buffer_rect_; | 319 gfx::Rect swap_buffer_rect_; |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 340 #if DEBUG_GL_CALLS && !defined(NDEBUG) | 346 #if DEBUG_GL_CALLS && !defined(NDEBUG) |
| 341 #define GLC(context, x) \ | 347 #define GLC(context, x) \ |
| 342 (x, GLRenderer::DebugGLCall (&* context, #x, __FILE__, __LINE__)) | 348 (x, GLRenderer::DebugGLCall (&* context, #x, __FILE__, __LINE__)) |
| 343 #else | 349 #else |
| 344 #define GLC(context, x) (x) | 350 #define GLC(context, x) (x) |
| 345 #endif | 351 #endif |
| 346 | 352 |
| 347 } | 353 } |
| 348 | 354 |
| 349 #endif // CC_OUTPUT_GL_RENDERER_H_ | 355 #endif // CC_OUTPUT_GL_RENDERER_H_ |
| OLD | NEW |