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

Side by Side Diff: cc/gl_renderer.cc

Issue 11417035: cc: Switch the DrawQuad enum names to chromium style and remove pragmas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « cc/draw_quad.cc ('k') | cc/io_surface_draw_quad.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "cc/gl_renderer.h" 5 #include "cc/gl_renderer.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_split.h" 9 #include "base/string_split.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 } 249 }
250 250
251 void GLRenderer::drawQuad(DrawingFrame& frame, const DrawQuad* quad) 251 void GLRenderer::drawQuad(DrawingFrame& frame, const DrawQuad* quad)
252 { 252 {
253 if (quad->needsBlending()) 253 if (quad->needsBlending())
254 GLC(m_context, m_context->enable(GL_BLEND)); 254 GLC(m_context, m_context->enable(GL_BLEND));
255 else 255 else
256 GLC(m_context, m_context->disable(GL_BLEND)); 256 GLC(m_context, m_context->disable(GL_BLEND));
257 257
258 switch (quad->material()) { 258 switch (quad->material()) {
259 case DrawQuad::Invalid: 259 case DrawQuad::INVALID:
260 NOTREACHED(); 260 NOTREACHED();
261 break; 261 break;
262 case DrawQuad::Checkerboard: 262 case DrawQuad::CHECKERBOARD:
263 drawCheckerboardQuad(frame, CheckerboardDrawQuad::materialCast(quad)); 263 drawCheckerboardQuad(frame, CheckerboardDrawQuad::materialCast(quad));
264 break; 264 break;
265 case DrawQuad::DebugBorder: 265 case DrawQuad::DEBUG_BORDER:
266 drawDebugBorderQuad(frame, DebugBorderDrawQuad::materialCast(quad)); 266 drawDebugBorderQuad(frame, DebugBorderDrawQuad::materialCast(quad));
267 break; 267 break;
268 case DrawQuad::IOSurfaceContent: 268 case DrawQuad::IO_SURFACE_CONTENT:
269 drawIOSurfaceQuad(frame, IOSurfaceDrawQuad::materialCast(quad)); 269 drawIOSurfaceQuad(frame, IOSurfaceDrawQuad::materialCast(quad));
270 break; 270 break;
271 case DrawQuad::RenderPass: 271 case DrawQuad::RENDER_PASS:
272 drawRenderPassQuad(frame, RenderPassDrawQuad::materialCast(quad)); 272 drawRenderPassQuad(frame, RenderPassDrawQuad::materialCast(quad));
273 break; 273 break;
274 case DrawQuad::SolidColor: 274 case DrawQuad::SOLID_COLOR:
275 drawSolidColorQuad(frame, SolidColorDrawQuad::materialCast(quad)); 275 drawSolidColorQuad(frame, SolidColorDrawQuad::materialCast(quad));
276 break; 276 break;
277 case DrawQuad::StreamVideoContent: 277 case DrawQuad::STREAM_VIDEO_CONTENT:
278 drawStreamVideoQuad(frame, StreamVideoDrawQuad::materialCast(quad)); 278 drawStreamVideoQuad(frame, StreamVideoDrawQuad::materialCast(quad));
279 break; 279 break;
280 case DrawQuad::TextureContent: 280 case DrawQuad::TEXTURE_CONTENT:
281 drawTextureQuad(frame, TextureDrawQuad::materialCast(quad)); 281 drawTextureQuad(frame, TextureDrawQuad::materialCast(quad));
282 break; 282 break;
283 case DrawQuad::TiledContent: 283 case DrawQuad::TILED_CONTENT:
284 drawTileQuad(frame, TileDrawQuad::materialCast(quad)); 284 drawTileQuad(frame, TileDrawQuad::materialCast(quad));
285 break; 285 break;
286 case DrawQuad::YUVVideoContent: 286 case DrawQuad::YUV_VIDEO_CONTENT:
287 drawYUVVideoQuad(frame, YUVVideoDrawQuad::materialCast(quad)); 287 drawYUVVideoQuad(frame, YUVVideoDrawQuad::materialCast(quad));
288 break; 288 break;
289 } 289 }
290 } 290 }
291 291
292 void GLRenderer::drawCheckerboardQuad(const DrawingFrame& frame, const Checkerbo ardDrawQuad* quad) 292 void GLRenderer::drawCheckerboardQuad(const DrawingFrame& frame, const Checkerbo ardDrawQuad* quad)
293 { 293 {
294 const TileCheckerboardProgram* program = tileCheckerboardProgram(); 294 const TileCheckerboardProgram* program = tileCheckerboardProgram();
295 DCHECK(program && program->initialized()); 295 DCHECK(program && program->initialized());
296 GLC(context(), context()->useProgram(program->program())); 296 GLC(context(), context()->useProgram(program->program()));
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 1588
1589 releaseRenderPassTextures(); 1589 releaseRenderPassTextures();
1590 } 1590 }
1591 1591
1592 bool GLRenderer::isContextLost() 1592 bool GLRenderer::isContextLost()
1593 { 1593 {
1594 return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR); 1594 return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR);
1595 } 1595 }
1596 1596
1597 } // namespace cc 1597 } // namespace cc
OLDNEW
« no previous file with comments | « cc/draw_quad.cc ('k') | cc/io_surface_draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698