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

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

Issue 311183002: Push dash checks into GrContext. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix merge issue with bounder Created 6 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright 2010 Google Inc. 2 * Copyright 2010 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 GrContext_DEFINED 8 #ifndef GrContext_DEFINED
9 #define GrContext_DEFINED 9 #define GrContext_DEFINED
10 10
(...skipping 14 matching lines...) Expand all
25 class GrEffect; 25 class GrEffect;
26 class GrFontCache; 26 class GrFontCache;
27 class GrGpu; 27 class GrGpu;
28 class GrIndexBuffer; 28 class GrIndexBuffer;
29 class GrIndexBufferAllocPool; 29 class GrIndexBufferAllocPool;
30 class GrInOrderDrawBuffer; 30 class GrInOrderDrawBuffer;
31 class GrLayerCache; 31 class GrLayerCache;
32 class GrOvalRenderer; 32 class GrOvalRenderer;
33 class GrPath; 33 class GrPath;
34 class GrPathRenderer; 34 class GrPathRenderer;
35 class GrPaintStyle;
35 class GrResourceEntry; 36 class GrResourceEntry;
36 class GrResourceCache; 37 class GrResourceCache;
37 class GrStencilBuffer; 38 class GrStencilBuffer;
38 class GrTestTarget; 39 class GrTestTarget;
39 class GrTextureParams; 40 class GrTextureParams;
40 class GrVertexBuffer; 41 class GrVertexBuffer;
41 class GrVertexBufferAllocPool; 42 class GrVertexBufferAllocPool;
42 class GrSoftwarePathRenderer; 43 class GrSoftwarePathRenderer;
43 class SkStrokeRec; 44 class SkStrokeRec;
44 45
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 * If stroke == NULL, then the rect is filled. 457 * If stroke == NULL, then the rect is filled.
457 * Otherwise, if stroke width == 0, then the stroke 458 * Otherwise, if stroke width == 0, then the stroke
458 * is always a single pixel thick, else the rect is 459 * is always a single pixel thick, else the rect is
459 * mitered/beveled stroked based on stroke width. 460 * mitered/beveled stroked based on stroke width.
460 * @param matrix Optional matrix applied to the rect. Applied before 461 * @param matrix Optional matrix applied to the rect. Applied before
461 * context's matrix or the paint's matrix. 462 * context's matrix or the paint's matrix.
462 * The rects coords are used to access the paint (through texture matrix) 463 * The rects coords are used to access the paint (through texture matrix)
463 */ 464 */
464 void drawRect(const GrPaint& paint, 465 void drawRect(const GrPaint& paint,
465 const SkRect&, 466 const SkRect&,
466 const SkStrokeRec* stroke = NULL, 467 const GrPaintStyle* style = NULL,
467 const SkMatrix* matrix = NULL); 468 const SkMatrix* matrix = NULL);
468 469
469 /** 470 /**
470 * Maps a rect of local coordinates onto the a rect of destination 471 * Maps a rect of local coordinates onto the a rect of destination
471 * coordinates. Each rect can optionally be transformed. The localRect 472 * coordinates. Each rect can optionally be transformed. The localRect
472 * is stretched over the dstRect. The dstRect is transformed by the 473 * is stretched over the dstRect. The dstRect is transformed by the
473 * context's matrix. Additional optional matrices for both rects can be 474 * context's matrix. Additional optional matrices for both rects can be
474 * provided by parameters. 475 * provided by parameters.
475 * 476 *
476 * @param paint describes how to color pixels. 477 * @param paint describes how to color pixels.
477 * @param dstRect the destination rect to draw. 478 * @param dstRect the destination rect to draw.
478 * @param localRect rect of local coordinates to be mapped onto dstRect 479 * @param localRect rect of local coordinates to be mapped onto dstRect
479 * @param dstMatrix Optional matrix to transform dstRect. Applied before context's matrix. 480 * @param dstMatrix Optional matrix to transform dstRect. Applied before context's matrix.
480 * @param localMatrix Optional matrix to transform localRect. 481 * @param localMatrix Optional matrix to transform localRect.
481 */ 482 */
482 void drawRectToRect(const GrPaint& paint, 483 void drawRectToRect(const GrPaint& paint,
483 const SkRect& dstRect, 484 const SkRect& dstRect,
484 const SkRect& localRect, 485 const SkRect& localRect,
485 const SkMatrix* dstMatrix = NULL, 486 const SkMatrix* dstMatrix = NULL,
486 const SkMatrix* localMatrix = NULL); 487 const SkMatrix* localMatrix = NULL);
487 488
488 /** 489 /**
489 * Draw a roundrect using a paint. 490 * Draw a roundrect using a paint.
490 * 491 *
491 * @param paint describes how to color pixels. 492 * @param paint describes how to color pixels.
492 * @param rrect the roundrect to draw 493 * @param rrect the roundrect to draw
493 * @param stroke the stroke information (width, join, cap) 494 * @param stroke the stroke information (width, join, cap)
494 */ 495 */
495 void drawRRect(const GrPaint& paint, const SkRRect& rrect, const SkStrokeRec & stroke); 496 void drawRRect(const GrPaint& paint, const SkRRect& rrect, const GrPaintStyl e& style);
496 497
497 /** 498 /**
498 * Shortcut for drawing an SkPath consisting of nested rrects using a paint . 499 * Shortcut for drawing an SkPath consisting of nested rrects using a paint .
499 * Does not support stroking. The result is undefined if outer does not con tain 500 * Does not support stroking. The result is undefined if outer does not con tain
500 * inner. 501 * inner.
501 * 502 *
502 * @param paint describes how to color pixels. 503 * @param paint describes how to color pixels.
503 * @param outer the outer roundrect 504 * @param outer the outer roundrect
504 * @param inner the inner roundrect 505 * @param inner the inner roundrect
505 */ 506 */
506 void drawDRRect(const GrPaint& paint, const SkRRect& outer, const SkRRect& i nner); 507 void drawDRRect(const GrPaint& paint, const SkRRect& outer, const SkRRect& i nner);
507 508
508 509
509 /** 510 /**
510 * Draws a path. 511 * Draws a path.
511 * 512 *
512 * @param paint describes how to color pixels. 513 * @param paint describes how to color pixels.
513 * @param path the path to draw 514 * @param path the path to draw
514 * @param stroke the stroke information (width, join, cap) 515 * @param stroke the stroke information (width, join, cap)
515 */ 516 */
516 void drawPath(const GrPaint& paint, const SkPath& path, const SkStrokeRec& s troke); 517 void drawPath(const GrPaint& paint, const SkPath& path, const GrPaintStyle& style);
517 518
518 /** 519 /**
519 * Draws vertices with a paint. 520 * Draws vertices with a paint.
520 * 521 *
521 * @param paint describes how to color pixels. 522 * @param paint describes how to color pixels.
522 * @param primitiveType primitives type to draw. 523 * @param primitiveType primitives type to draw.
523 * @param vertexCount number of vertices. 524 * @param vertexCount number of vertices.
524 * @param positions array of vertex positions, required. 525 * @param positions array of vertex positions, required.
525 * @param texCoords optional array of texture coordinates used 526 * @param texCoords optional array of texture coordinates used
526 * to access the paint. 527 * to access the paint.
(...skipping 15 matching lines...) Expand all
542 543
543 /** 544 /**
544 * Draws an oval. 545 * Draws an oval.
545 * 546 *
546 * @param paint describes how to color pixels. 547 * @param paint describes how to color pixels.
547 * @param oval the bounding rect of the oval. 548 * @param oval the bounding rect of the oval.
548 * @param stroke the stroke information (width, style) 549 * @param stroke the stroke information (width, style)
549 */ 550 */
550 void drawOval(const GrPaint& paint, 551 void drawOval(const GrPaint& paint,
551 const SkRect& oval, 552 const SkRect& oval,
552 const SkStrokeRec& stroke); 553 const GrPaintStyle& style);
553 554
554 /////////////////////////////////////////////////////////////////////////// 555 ///////////////////////////////////////////////////////////////////////////
555 // Misc. 556 // Misc.
556 557
557 /** 558 /**
558 * Flags that affect flush() behavior. 559 * Flags that affect flush() behavior.
559 */ 560 */
560 enum FlushBits { 561 enum FlushBits {
561 /** 562 /**
562 * A client may reach a point where it has partially rendered a frame 563 * A client may reach a point where it has partially rendered a frame
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 } 1123 }
1123 1124
1124 GrTexture* texture() { return fTexture; } 1125 GrTexture* texture() { return fTexture; }
1125 1126
1126 private: 1127 private:
1127 GrContext* fContext; 1128 GrContext* fContext;
1128 GrTexture* fTexture; 1129 GrTexture* fTexture;
1129 }; 1130 };
1130 1131
1131 #endif 1132 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrBitmapTextContext.cpp » ('j') | src/gpu/GrContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698