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

Side by Side Diff: include/gpu/GrTypes.h

Issue 15068008: Remove GrPathCmd (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | include/gpu/SkGr.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 1
2 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 }; 493 };
494 494
495 /** 495 /**
496 * Clips are composed from these objects. 496 * Clips are composed from these objects.
497 */ 497 */
498 enum GrClipType { 498 enum GrClipType {
499 kRect_ClipType, 499 kRect_ClipType,
500 kPath_ClipType 500 kPath_ClipType
501 }; 501 };
502 502
503 /**
504 * Commands used to describe a path. Each command
505 * is accompanied by some number of points.
506 */
507 enum GrPathCmd {
508 kMove_PathCmd, //!< Starts a new subpath at
509 // at the returned point
510 // 1 point
511 kLine_PathCmd, //!< Adds a line segment
512 // 2 points
513 kQuadratic_PathCmd, //!< Adds a quadratic segment
514 // 3 points
515 kCubic_PathCmd, //!< Adds a cubic segment
516 // 4 points
517 kClose_PathCmd, //!< Closes the current subpath
518 // by connecting a line to the
519 // starting point.
520 // 0 points
521 kEnd_PathCmd //!< Indicates the end of the last subpath
522 // when iterating
523 // 0 points.
524 };
525
526 /**
527 * Gets the number of points associated with a path command.
528 */
529 static int inline NumPathCmdPoints(GrPathCmd cmd) {
530 static const int gNumPoints[] = {
531 1, 2, 3, 4, 0, 0
532 };
533 return gNumPoints[cmd];
534 }
535
536 /////////////////////////////////////////////////////////////////////////////// 503 ///////////////////////////////////////////////////////////////////////////////
537 504
538 // opaque type for 3D API object handles 505 // opaque type for 3D API object handles
539 typedef intptr_t GrBackendObject; 506 typedef intptr_t GrBackendObject;
540 507
541 /** 508 /**
542 * Gr can wrap an existing texture created by the client with a GrTexture 509 * Gr can wrap an existing texture created by the client with a GrTexture
543 * object. The client is responsible for ensuring that the texture lives at 510 * object. The client is responsible for ensuring that the texture lives at
544 * least as long as the GrTexture object wrapping it. We require the client to 511 * least as long as the GrTexture object wrapping it. We require the client to
545 * explicitly provide information about the texture, such as width, height, 512 * explicitly provide information about the texture, such as width, height,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 /** 591 /**
625 * Handle to the 3D API object. 592 * Handle to the 3D API object.
626 * OpenGL: FBO ID 593 * OpenGL: FBO ID
627 */ 594 */
628 GrBackendObject fRenderTargetHandle; 595 GrBackendObject fRenderTargetHandle;
629 }; 596 };
630 597
631 /////////////////////////////////////////////////////////////////////////////// 598 ///////////////////////////////////////////////////////////////////////////////
632 599
633 #endif 600 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/SkGr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698