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

Side by Side Diff: src/gpu/GrGpu.h

Issue 367643004: Implement NVPR on GLES (Closed) Base URL: https://skia.googlesource.com/skia.git@02-path-program-fragment
Patch Set: rebase Created 6 years, 4 months 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
« no previous file with comments | « no previous file | src/gpu/gl/GrGLCaps.cpp » ('j') | src/gpu/gl/GrGLProgram.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrGpu_DEFINED 8 #ifndef GrGpu_DEFINED
9 #define GrGpu_DEFINED 9 #define GrGpu_DEFINED
10 10
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 342
343 enum DrawType { 343 enum DrawType {
344 kDrawPoints_DrawType, 344 kDrawPoints_DrawType,
345 kDrawLines_DrawType, 345 kDrawLines_DrawType,
346 kDrawTriangles_DrawType, 346 kDrawTriangles_DrawType,
347 kStencilPath_DrawType, 347 kStencilPath_DrawType,
348 kDrawPath_DrawType, 348 kDrawPath_DrawType,
349 kDrawPaths_DrawType, 349 kDrawPaths_DrawType,
350 }; 350 };
351 351
352 static bool IsPathRenderingDrawType(DrawType type) {
353 return kDrawPath_DrawType == type || kDrawPaths_DrawType == type;
354 }
355
352 protected: 356 protected:
353 DrawType PrimTypeToDrawType(GrPrimitiveType type) { 357 DrawType PrimTypeToDrawType(GrPrimitiveType type) {
354 switch (type) { 358 switch (type) {
355 case kTriangles_GrPrimitiveType: 359 case kTriangles_GrPrimitiveType:
356 case kTriangleStrip_GrPrimitiveType: 360 case kTriangleStrip_GrPrimitiveType:
357 case kTriangleFan_GrPrimitiveType: 361 case kTriangleFan_GrPrimitiveType:
358 return kDrawTriangles_DrawType; 362 return kDrawTriangles_DrawType;
359 case kPoints_GrPrimitiveType: 363 case kPoints_GrPrimitiveType:
360 return kDrawPoints_DrawType; 364 return kDrawPoints_DrawType;
361 case kLines_GrPrimitiveType: 365 case kLines_GrPrimitiveType:
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 // these are mutable so they can be created on-demand 542 // these are mutable so they can be created on-demand
539 mutable GrIndexBuffer* fQuadInd exBuffer; 543 mutable GrIndexBuffer* fQuadInd exBuffer;
540 // Used to abandon/release all resources created by this GrGpu. TODO: Move t his 544 // Used to abandon/release all resources created by this GrGpu. TODO: Move t his
541 // functionality to GrResourceCache. 545 // functionality to GrResourceCache.
542 ObjectList fObjectL ist; 546 ObjectList fObjectL ist;
543 547
544 typedef GrDrawTarget INHERITED; 548 typedef GrDrawTarget INHERITED;
545 }; 549 };
546 550
547 #endif 551 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLCaps.cpp » ('j') | src/gpu/gl/GrGLProgram.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698