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

Side by Side Diff: include/gpu/GrContext.h

Issue 696293004: Rename and clarify semantics of GrContext::resolveRenderTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@fix
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | include/gpu/GrRenderTarget.h » ('j') | src/gpu/GrContext.cpp » ('J')
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 GrContext_DEFINED 8 #ifndef GrContext_DEFINED
9 #define GrContext_DEFINED 9 #define GrContext_DEFINED
10 10
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 SkIPoint::Make(0,0)); 652 SkIPoint::Make(0,0));
653 return true; 653 return true;
654 } 654 }
655 655
656 /** 656 /**
657 * After this returns any pending writes to the surface will have been issue d to the backend 3D API. 657 * After this returns any pending writes to the surface will have been issue d to the backend 3D API.
658 */ 658 */
659 void flushSurfaceWrites(GrSurface* surface); 659 void flushSurfaceWrites(GrSurface* surface);
660 660
661 /** 661 /**
662 * Resolves a render target that has MSAA. The intermediate MSAA buffer is 662 * Equivalent to flushSurfaceWrites but also performs MSAA resolve if necess ary. This call is
663 * down-sampled to the associated GrTexture (accessible via 663 * used to make the surface contents available to be read in the backend 3D API, usually for a
664 * GrRenderTarget::asTexture()). Any pending draws to the render target will 664 * compositing step external to Skia.
665 * be executed before the resolve.
666 * 665 *
667 * This is only necessary when a client wants to access the object directly 666 * It is not necessary to call this before reading the render target via Ski a/GrContext.
668 * using the backend API directly. GrContext will detect when it must 667 * GrContext will detect when it must perform a resolve before reading pixel s back from the
669 * perform a resolve to a GrTexture used as the source of a draw or before 668 * surface or using it as a texture.
670 * reading pixels back from a GrTexture or GrRenderTarget.
671 */ 669 */
672 void resolveRenderTarget(GrRenderTarget*); 670 void prepareSurfaceForExternalRead(GrSurface*);
673 671
674 /** 672 /**
675 * Provides a perfomance hint that the render target's contents are allowed 673 * Provides a perfomance hint that the render target's contents are allowed
676 * to become undefined. 674 * to become undefined.
677 */ 675 */
678 void discardRenderTarget(GrRenderTarget*); 676 void discardRenderTarget(GrRenderTarget*);
679 677
680 #ifdef SK_DEVELOPER 678 #ifdef SK_DEVELOPER
681 void dumpFontCache() const; 679 void dumpFontCache() const;
682 #endif 680 #endif
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 /** 1009 /**
1012 * This callback allows the resource cache to callback into the GrContext 1010 * This callback allows the resource cache to callback into the GrContext
1013 * when the cache is still overbudget after a purge. 1011 * when the cache is still overbudget after a purge.
1014 */ 1012 */
1015 static bool OverbudgetCB(void* data); 1013 static bool OverbudgetCB(void* data);
1016 1014
1017 typedef SkRefCnt INHERITED; 1015 typedef SkRefCnt INHERITED;
1018 }; 1016 };
1019 1017
1020 #endif 1018 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrRenderTarget.h » ('j') | src/gpu/GrContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698