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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 * @param devBounds optional bounds hint. This is a promise from the call
er, | 403 * @param devBounds optional bounds hint. This is a promise from the call
er, |
404 * not a request for clipping. | 404 * not a request for clipping. |
405 */ | 405 */ |
406 void drawIndexedInstances(GrPrimitiveType type, | 406 void drawIndexedInstances(GrPrimitiveType type, |
407 int instanceCount, | 407 int instanceCount, |
408 int verticesPerInstance, | 408 int verticesPerInstance, |
409 int indicesPerInstance, | 409 int indicesPerInstance, |
410 const SkRect* devBounds = NULL); | 410 const SkRect* devBounds = NULL); |
411 | 411 |
412 /** | 412 /** |
413 * Clear the current render target if one isn't passed in. Ignores the | 413 * Clear the passed in render target. Ignores the draw state and clip. Clear
s the whole thing if |
414 * clip and all other draw state (blend mode, stages, etc). Clears the | 414 * rect is NULL, otherwise just the rect. If canIgnoreRect is set then the e
ntire render target |
415 * whole thing if rect is NULL, otherwise just the rect. If canIgnoreRect | 415 * can be optionally cleared. |
416 * is set then the entire render target can be optionally cleared. | |
417 */ | 416 */ |
418 virtual void clear(const SkIRect* rect, | 417 virtual void clear(const SkIRect* rect, GrColor color, bool canIgnoreRect, |
419 GrColor color, | 418 GrRenderTarget* renderTarget) = 0; |
420 bool canIgnoreRect, | |
421 GrRenderTarget* renderTarget = NULL) = 0; | |
422 | 419 |
423 /** | 420 /** |
424 * Discards the contents render target. NULL indicates that the current rend
er target should | 421 * Discards the contents render target. |
425 * be discarded. | |
426 **/ | 422 **/ |
427 virtual void discard(GrRenderTarget* = NULL) = 0; | 423 virtual void discard(GrRenderTarget*) = 0; |
428 | 424 |
429 /** | 425 /** |
430 * Called at start and end of gpu trace marking | 426 * Called at start and end of gpu trace marking |
431 * GR_CREATE_GPU_TRACE_MARKER(marker_str, target) will automatically call th
ese at the start | 427 * GR_CREATE_GPU_TRACE_MARKER(marker_str, target) will automatically call th
ese at the start |
432 * and end of a code block respectively | 428 * and end of a code block respectively |
433 */ | 429 */ |
434 void addGpuTraceMarker(const GrGpuTraceMarker* marker); | 430 void addGpuTraceMarker(const GrGpuTraceMarker* marker); |
435 void removeGpuTraceMarker(const GrGpuTraceMarker* marker); | 431 void removeGpuTraceMarker(const GrGpuTraceMarker* marker); |
436 | 432 |
437 /** | 433 /** |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 protected: | 976 protected: |
981 GrClipMaskManager fClipMaskManager; | 977 GrClipMaskManager fClipMaskManager; |
982 | 978 |
983 private: | 979 private: |
984 GrClipMaskManager* getClipMaskManager() { return &fClipMaskManager; } | 980 GrClipMaskManager* getClipMaskManager() { return &fClipMaskManager; } |
985 | 981 |
986 typedef GrDrawTarget INHERITED; | 982 typedef GrDrawTarget INHERITED; |
987 }; | 983 }; |
988 | 984 |
989 #endif | 985 #endif |
OLD | NEW |