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

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

Issue 694983002: Revert of GrContext no longer ever draws on Gpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
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 | src/gpu/GrContext.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 GrContext_DEFINED 8 #ifndef GrContext_DEFINED
9 #define GrContext_DEFINED 9 #define GrContext_DEFINED
10 10
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 void incRenderTargetBinds() {} 934 void incRenderTargetBinds() {}
935 void incShaderCompilations() {} 935 void incShaderCompilations() {}
936 #endif 936 #endif
937 }; 937 };
938 938
939 #if GR_GPU_STATS 939 #if GR_GPU_STATS
940 const GPUStats* gpuStats() const; 940 const GPUStats* gpuStats() const;
941 #endif 941 #endif
942 942
943 private: 943 private:
944 // Used to indicate whether a draw should be performed immediately or queued in fDrawBuffer.
945 enum BufferedDraw {
946 kYes_BufferedDraw,
947 kNo_BufferedDraw,
948 };
949 BufferedDraw fLastDrawWasBuffered;
950
944 GrGpu* fGpu; 951 GrGpu* fGpu;
945 SkMatrix fViewMatrix; 952 SkMatrix fViewMatrix;
946 SkAutoTUnref<GrRenderTarget> fRenderTarget; 953 SkAutoTUnref<GrRenderTarget> fRenderTarget;
947 const GrClipData* fClip; // TODO: make this ref counted 954 const GrClipData* fClip; // TODO: make this ref counted
948 GrDrawState* fDrawState; 955 GrDrawState* fDrawState;
949 956
950 GrResourceCache* fResourceCache; 957 GrResourceCache* fResourceCache;
951 GrResourceCache2* fResourceCache2; 958 GrResourceCache2* fResourceCache2;
952 GrFontCache* fFontCache; 959 GrFontCache* fFontCache;
953 SkAutoTDelete<GrLayerCache> fLayerCache; 960 SkAutoTDelete<GrLayerCache> fLayerCache;
(...skipping 28 matching lines...) Expand all
982 989
983 GrContext(const Options&); // init must be called after the constructor. 990 GrContext(const Options&); // init must be called after the constructor.
984 bool init(GrBackend, GrBackendContext); 991 bool init(GrBackend, GrBackendContext);
985 992
986 void setupDrawBuffer(); 993 void setupDrawBuffer();
987 994
988 class AutoRestoreEffects; 995 class AutoRestoreEffects;
989 class AutoCheckFlush; 996 class AutoCheckFlush;
990 /// Sets the paint and returns the target to draw into. The paint can be NUL L in which case the 997 /// Sets the paint and returns the target to draw into. The paint can be NUL L in which case the
991 /// draw state is left unmodified. 998 /// draw state is left unmodified.
992 GrDrawTarget* prepareToDraw(const GrPaint*, AutoRestoreEffects*, AutoCheckFl ush*); 999 GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects *, AutoCheckFlush*);
993 1000
994 void internalDrawPath(GrDrawTarget* target, bool useAA, const SkPath& path, 1001 void internalDrawPath(GrDrawTarget* target, bool useAA, const SkPath& path,
995 const GrStrokeInfo& stroke); 1002 const GrStrokeInfo& stroke);
996 1003
997 GrTexture* createResizedTexture(const GrSurfaceDesc& desc, 1004 GrTexture* createResizedTexture(const GrSurfaceDesc& desc,
998 const GrCacheID& cacheID, 1005 const GrCacheID& cacheID,
999 const void* srcData, 1006 const void* srcData,
1000 size_t rowBytes, 1007 size_t rowBytes,
1001 bool filter); 1008 bool filter);
1002 1009
(...skipping 10 matching lines...) Expand all
1013 /** 1020 /**
1014 * This callback allows the resource cache to callback into the GrContext 1021 * This callback allows the resource cache to callback into the GrContext
1015 * when the cache is still overbudget after a purge. 1022 * when the cache is still overbudget after a purge.
1016 */ 1023 */
1017 static bool OverbudgetCB(void* data); 1024 static bool OverbudgetCB(void* data);
1018 1025
1019 typedef SkRefCnt INHERITED; 1026 typedef SkRefCnt INHERITED;
1020 }; 1027 };
1021 1028
1022 #endif 1029 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698