| 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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 * clip and all other draw state (blend mode, stages, etc). Clears the | 431 * clip and all other draw state (blend mode, stages, etc). Clears the |
| 432 * whole thing if rect is NULL, otherwise just the rect. If canIgnoreRect | 432 * whole thing if rect is NULL, otherwise just the rect. If canIgnoreRect |
| 433 * is set then the entire render target can be optionally cleared. | 433 * is set then the entire render target can be optionally cleared. |
| 434 */ | 434 */ |
| 435 virtual void clear(const SkIRect* rect, | 435 virtual void clear(const SkIRect* rect, |
| 436 GrColor color, | 436 GrColor color, |
| 437 bool canIgnoreRect, | 437 bool canIgnoreRect, |
| 438 GrRenderTarget* renderTarget = NULL) = 0; | 438 GrRenderTarget* renderTarget = NULL) = 0; |
| 439 | 439 |
| 440 /** | 440 /** |
| 441 * Discards the contents render target. NULL indicates that the current rend
er target should |
| 442 * be discarded. |
| 443 **/ |
| 444 virtual void discard(GrRenderTarget* = NULL) = 0; |
| 445 |
| 446 /** |
| 441 * Called at start and end of gpu trace marking | 447 * Called at start and end of gpu trace marking |
| 442 * GR_CREATE_GPU_TRACE_MARKER(marker_str, target) will automatically call th
ese at the start | 448 * GR_CREATE_GPU_TRACE_MARKER(marker_str, target) will automatically call th
ese at the start |
| 443 * and end of a code block respectively | 449 * and end of a code block respectively |
| 444 */ | 450 */ |
| 445 void addGpuTraceMarker(GrGpuTraceMarker* marker); | 451 void addGpuTraceMarker(GrGpuTraceMarker* marker); |
| 446 void removeGpuTraceMarker(GrGpuTraceMarker* marker); | 452 void removeGpuTraceMarker(GrGpuTraceMarker* marker); |
| 447 | 453 |
| 448 /** | 454 /** |
| 449 * Copies a pixel rectangle from one surface to another. This call may final
ize | 455 * Copies a pixel rectangle from one surface to another. This call may final
ize |
| 450 * reserved vertex/index data (as though a draw call was made). The src pixe
ls | 456 * reserved vertex/index data (as though a draw call was made). The src pixe
ls |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar
get. | 940 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar
get. |
| 935 GrContext* fContext; | 941 GrContext* fContext; |
| 936 // To keep track that we always have at least as many debug marker adds as r
emoves | 942 // To keep track that we always have at least as many debug marker adds as r
emoves |
| 937 int fGpuTraceMar
kerCount; | 943 int fGpuTraceMar
kerCount; |
| 938 GrTraceMarkerSet fActiveTrace
Markers; | 944 GrTraceMarkerSet fActiveTrace
Markers; |
| 939 | 945 |
| 940 typedef SkRefCnt INHERITED; | 946 typedef SkRefCnt INHERITED; |
| 941 }; | 947 }; |
| 942 | 948 |
| 943 #endif | 949 #endif |
| OLD | NEW |