Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/gpu/GrDrawTarget.h

Issue 211683002: Add discard API to SkCanvas, plumb it to glDiscardFramebuffer() (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: move to ToT Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698