OLD | NEW |
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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 | 427 |
428 /////////////////////////////////////////////////////////////////////////// | 428 /////////////////////////////////////////////////////////////////////////// |
429 // Draws | 429 // Draws |
430 | 430 |
431 /** | 431 /** |
432 * Clear the entire or rect of the render target, ignoring any clips. | 432 * Clear the entire or rect of the render target, ignoring any clips. |
433 * @param rect the rect to clear or the whole thing if rect is NULL. | 433 * @param rect the rect to clear or the whole thing if rect is NULL. |
434 * @param color the color to clear to. | 434 * @param color the color to clear to. |
435 * @param canIgnoreRect allows partial clears to be converted to whole | 435 * @param canIgnoreRect allows partial clears to be converted to whole |
436 * clears on platforms for which that is cheap | 436 * clears on platforms for which that is cheap |
437 * @param target if non-NULL, the render target to clear otherwise clear | 437 * @param target The render target to clear. |
438 * the current render target | |
439 */ | 438 */ |
440 void clear(const SkIRect* rect, GrColor color, bool canIgnoreRect, | 439 void clear(const SkIRect* rect, GrColor color, bool canIgnoreRect, GrRenderT
arget* target); |
441 GrRenderTarget* target = NULL); | |
442 | 440 |
443 /** | 441 /** |
444 * Draw everywhere (respecting the clip) with the paint. | 442 * Draw everywhere (respecting the clip) with the paint. |
445 */ | 443 */ |
446 void drawPaint(const GrPaint& paint); | 444 void drawPaint(const GrPaint& paint); |
447 | 445 |
448 /** | 446 /** |
449 * Draw the rect using a paint. | 447 * Draw the rect using a paint. |
450 * @param paint describes how to color pixels. | 448 * @param paint describes how to color pixels. |
451 * @param strokeInfo the stroke information (width, join, cap), and. | 449 * @param strokeInfo the stroke information (width, join, cap), and. |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 /** Any surface writes should be flushed to the backend 3D API after the
surface operation | 577 /** Any surface writes should be flushed to the backend 3D API after the
surface operation |
580 is complete */ | 578 is complete */ |
581 kFlushWrites_PixelOp = 0x2, | 579 kFlushWrites_PixelOp = 0x2, |
582 /** The src for write or dst read is unpremultiplied. This is only respe
cted if both the | 580 /** The src for write or dst read is unpremultiplied. This is only respe
cted if both the |
583 config src and dst configs are an RGBA/BGRA 8888 format. */ | 581 config src and dst configs are an RGBA/BGRA 8888 format. */ |
584 kUnpremul_PixelOpsFlag = 0x4, | 582 kUnpremul_PixelOpsFlag = 0x4, |
585 }; | 583 }; |
586 | 584 |
587 /** | 585 /** |
588 * Reads a rectangle of pixels from a render target. | 586 * Reads a rectangle of pixels from a render target. |
589 * @param target the render target to read from. NULL means the curre
nt render target. | 587 * @param target the render target to read from. |
590 * @param left left edge of the rectangle to read (inclusive) | 588 * @param left left edge of the rectangle to read (inclusive) |
591 * @param top top edge of the rectangle to read (inclusive) | 589 * @param top top edge of the rectangle to read (inclusive) |
592 * @param width width of rectangle to read in pixels. | 590 * @param width width of rectangle to read in pixels. |
593 * @param height height of rectangle to read in pixels. | 591 * @param height height of rectangle to read in pixels. |
594 * @param config the pixel config of the destination buffer | 592 * @param config the pixel config of the destination buffer |
595 * @param buffer memory to read the rectangle into. | 593 * @param buffer memory to read the rectangle into. |
596 * @param rowBytes number of bytes bewtween consecutive rows. Zero mean
s rows are tightly | 594 * @param rowBytes number of bytes bewtween consecutive rows. Zero mean
s rows are tightly |
597 * packed. | 595 * packed. |
598 * @param pixelOpsFlags see PixelOpsFlags enum above. | 596 * @param pixelOpsFlags see PixelOpsFlags enum above. |
599 * | 597 * |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1013 /** | 1011 /** |
1014 * This callback allows the resource cache to callback into the GrContext | 1012 * This callback allows the resource cache to callback into the GrContext |
1015 * when the cache is still overbudget after a purge. | 1013 * when the cache is still overbudget after a purge. |
1016 */ | 1014 */ |
1017 static bool OverbudgetCB(void* data); | 1015 static bool OverbudgetCB(void* data); |
1018 | 1016 |
1019 typedef SkRefCnt INHERITED; | 1017 typedef SkRefCnt INHERITED; |
1020 }; | 1018 }; |
1021 | 1019 |
1022 #endif | 1020 #endif |
OLD | NEW |