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 GrDrawTarget_DEFINED | 8 #ifndef GrDrawTarget_DEFINED |
9 #define GrDrawTarget_DEFINED | 9 #define GrDrawTarget_DEFINED |
10 | 10 |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
416 * clip and all other draw state (blend mode, stages, etc). Clears the | 416 * clip and all other draw state (blend mode, stages, etc). Clears the |
417 * whole thing if rect is NULL, otherwise just the rect. If canIgnoreRect | 417 * whole thing if rect is NULL, otherwise just the rect. If canIgnoreRect |
418 * is set then the entire render target can be optionally cleared. | 418 * is set then the entire render target can be optionally cleared. |
419 */ | 419 */ |
420 virtual void clear(const SkIRect* rect, | 420 virtual void clear(const SkIRect* rect, |
421 GrColor color, | 421 GrColor color, |
422 bool canIgnoreRect, | 422 bool canIgnoreRect, |
423 GrRenderTarget* renderTarget = NULL) = 0; | 423 GrRenderTarget* renderTarget = NULL) = 0; |
424 | 424 |
425 /** | 425 /** |
426 * Function calls to place debug markers in command stream. Must be implemen ted in derived class | |
427 * InsertEventMarker places a single "sign post" type marker into command st ream. The argument | |
428 * marker will be the name of the annotation that is added. | |
429 */ | |
430 virtual void insertEventMarker(const char* marker) {}; | |
bsalomon
2014/02/20 22:14:13
= 0?
Or make the GrDT track the push count and as
| |
431 /** | |
432 * The following two functions are used for marking groups of commands. Use pushGroupMarker | |
433 * to set the beginning of a command set, and popGroupMarker is be called at end of the command | |
434 * set. The argument marker is the name for the annotation that is added. Th e push and pops | |
435 * can be used hierarchically, but every push must have a match pop. | |
436 */ | |
437 virtual void pushGroupMarker(const char* marker) {}; | |
438 virtual void popGroupMarker() {}; | |
439 | |
440 /** | |
426 * Copies a pixel rectangle from one surface to another. This call may final ize | 441 * Copies a pixel rectangle from one surface to another. This call may final ize |
427 * reserved vertex/index data (as though a draw call was made). The src pixe ls | 442 * reserved vertex/index data (as though a draw call was made). The src pixe ls |
428 * copied are specified by srcRect. They are copied to a rect of the same | 443 * copied are specified by srcRect. They are copied to a rect of the same |
429 * size in dst with top left at dstPoint. If the src rect is clipped by the | 444 * size in dst with top left at dstPoint. If the src rect is clipped by the |
430 * src bounds then pixel values in the dst rect corresponding to area clipp ed | 445 * src bounds then pixel values in the dst rect corresponding to area clipp ed |
431 * by the src rect are not overwritten. This method can fail and return fals e | 446 * by the src rect are not overwritten. This method can fail and return fals e |
432 * depending on the type of surface, configs, etc, and the backend-specific | 447 * depending on the type of surface, configs, etc, and the backend-specific |
433 * limitations. If rect is clipped out entirely by the src or dst bounds the n | 448 * limitations. If rect is clipped out entirely by the src or dst bounds the n |
434 * true is returned since there is no actual copy necessary to succeed. | 449 * true is returned since there is no actual copy necessary to succeed. |
435 */ | 450 */ |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
886 const GrClipData* fClip; | 901 const GrClipData* fClip; |
887 GrDrawState* fDrawState; | 902 GrDrawState* fDrawState; |
888 GrDrawState fDefaultDraw State; | 903 GrDrawState fDefaultDraw State; |
889 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar get. | 904 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar get. |
890 GrContext* fContext; | 905 GrContext* fContext; |
891 | 906 |
892 typedef SkRefCnt INHERITED; | 907 typedef SkRefCnt INHERITED; |
893 }; | 908 }; |
894 | 909 |
895 #endif | 910 #endif |
OLD | NEW |