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

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

Issue 1142003003: Revert of Move copy-surface-as-draw fallback to GrGLGpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@vares
Patch Set: Created 5 years, 7 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
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrInOrderDrawBuffer.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 2011 Google Inc. 2 * Copyright 2011 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 GrGpu_DEFINED 8 #ifndef GrGpu_DEFINED
9 #define GrGpu_DEFINED 9 #define GrGpu_DEFINED
10 10
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // Returns a timestamp based on the number of times the context was reset. 250 // Returns a timestamp based on the number of times the context was reset.
251 // This timestamp can be used to lazily detect when cached 3D context state 251 // This timestamp can be used to lazily detect when cached 3D context state
252 // is dirty. 252 // is dirty.
253 ResetTimestamp getResetTimestamp() const { return fResetTimestamp; } 253 ResetTimestamp getResetTimestamp() const { return fResetTimestamp; }
254 254
255 virtual void buildProgramDesc(GrProgramDesc*, 255 virtual void buildProgramDesc(GrProgramDesc*,
256 const GrPrimitiveProcessor&, 256 const GrPrimitiveProcessor&,
257 const GrPipeline&, 257 const GrPipeline&,
258 const GrBatchTracker&) const = 0; 258 const GrBatchTracker&) const = 0;
259 259
260 // Called to determine whether a copySurface call would succeed or not. Deri ved
261 // classes must keep this consistent with their implementation of onCopySurf ace(). Fallbacks
262 // to issuing a draw from the src to dst take place at the GrDrawTarget leve l and this function
263 // should only return true if a faster copy path exists. The rect and point are pre-clipped. The
264 // src rect and implied dst rect are guaranteed to be within the src/dst bou nds and non-empty.
265 virtual bool canCopySurface(const GrSurface* dst,
266 const GrSurface* src,
267 const SkIRect& srcRect,
268 const SkIPoint& dstPoint) = 0;
269
260 // Called to perform a surface to surface copy. Fallbacks to issuing a draw from the src to dst 270 // Called to perform a surface to surface copy. Fallbacks to issuing a draw from the src to dst
261 // take place at the GrDrawTarget level and this function implement faster c opy paths. The rect 271 // take place at the GrDrawTarget level and this function implement faster c opy paths. The rect
262 // and point are pre-clipped. The src rect and implied dst rect are guarante ed to be within the 272 // and point are pre-clipped. The src rect and implied dst rect are guarante ed to be within the
263 // src/dst bounds and non-empty. 273 // src/dst bounds and non-empty.
264 virtual bool copySurface(GrSurface* dst, 274 virtual bool copySurface(GrSurface* dst,
265 GrSurface* src, 275 GrSurface* src,
266 const SkIRect& srcRect, 276 const SkIRect& srcRect,
267 const SkIPoint& dstPoint) = 0; 277 const SkIPoint& dstPoint) = 0;
268 278
269 // Called before certain draws in order to guarantee coherent results from d st reads. 279 // Called before certain draws in order to guarantee coherent results from d st reads.
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 int fGpuTrac eMarkerCount; 495 int fGpuTrac eMarkerCount;
486 GrTraceMarkerSet fActiveT raceMarkers; 496 GrTraceMarkerSet fActiveT raceMarkers;
487 GrTraceMarkerSet fStoredT raceMarkers; 497 GrTraceMarkerSet fStoredT raceMarkers;
488 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. 498 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu.
489 GrContext* fContext ; 499 GrContext* fContext ;
490 500
491 typedef SkRefCnt INHERITED; 501 typedef SkRefCnt INHERITED;
492 }; 502 };
493 503
494 #endif 504 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698