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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 */ | 372 */ |
373 void setClip(const GrClipData* clipData) { fClip = clipData; } | 373 void setClip(const GrClipData* clipData) { fClip = clipData; } |
374 | 374 |
375 /////////////////////////////////////////////////////////////////////////// | 375 /////////////////////////////////////////////////////////////////////////// |
376 // Draws | 376 // Draws |
377 | 377 |
378 /** | 378 /** |
379 * Clear the entire or rect of the render target, ignoring any clips. | 379 * Clear the entire or rect of the render target, ignoring any clips. |
380 * @param rect the rect to clear or the whole thing if rect is NULL. | 380 * @param rect the rect to clear or the whole thing if rect is NULL. |
381 * @param color the color to clear to. | 381 * @param color the color to clear to. |
| 382 * @param canIgnoreRect allows partial clears to be converted to whole |
| 383 * clears on platforms for which that is cheap |
382 * @param target if non-NULL, the render target to clear otherwise clear | 384 * @param target if non-NULL, the render target to clear otherwise clear |
383 * the current render target | 385 * the current render target |
384 */ | 386 */ |
385 void clear(const SkIRect* rect, GrColor color, | 387 void clear(const SkIRect* rect, GrColor color, bool canIgnoreRect, |
386 GrRenderTarget* target = NULL); | 388 GrRenderTarget* target = NULL); |
387 | 389 |
388 /** | 390 /** |
389 * Draw everywhere (respecting the clip) with the paint. | 391 * Draw everywhere (respecting the clip) with the paint. |
390 */ | 392 */ |
391 void drawPaint(const GrPaint& paint); | 393 void drawPaint(const GrPaint& paint); |
392 | 394 |
393 /** | 395 /** |
394 * Draw the rect using a paint. | 396 * Draw the rect using a paint. |
395 * @param paint describes how to color pixels. | 397 * @param paint describes how to color pixels. |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 } | 1030 } |
1029 | 1031 |
1030 GrTexture* texture() { return fTexture; } | 1032 GrTexture* texture() { return fTexture; } |
1031 | 1033 |
1032 private: | 1034 private: |
1033 GrContext* fContext; | 1035 GrContext* fContext; |
1034 GrTexture* fTexture; | 1036 GrTexture* fTexture; |
1035 }; | 1037 }; |
1036 | 1038 |
1037 #endif | 1039 #endif |
OLD | NEW |