OLD | NEW |
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 Loading... |
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 | |
270 // Called to perform a surface to surface copy. Fallbacks to issuing a draw
from the src to dst | 260 // Called to perform a surface to surface copy. Fallbacks to issuing a draw
from the src to dst |
271 // take place at the GrDrawTarget level and this function implement faster c
opy paths. The rect | 261 // take place at the GrDrawTarget level and this function implement faster c
opy paths. The rect |
272 // and point are pre-clipped. The src rect and implied dst rect are guarante
ed to be within the | 262 // and point are pre-clipped. The src rect and implied dst rect are guarante
ed to be within the |
273 // src/dst bounds and non-empty. | 263 // src/dst bounds and non-empty. |
274 virtual bool copySurface(GrSurface* dst, | 264 virtual bool copySurface(GrSurface* dst, |
275 GrSurface* src, | 265 GrSurface* src, |
276 const SkIRect& srcRect, | 266 const SkIRect& srcRect, |
277 const SkIPoint& dstPoint) = 0; | 267 const SkIPoint& dstPoint) = 0; |
278 | 268 |
279 // Called before certain draws in order to guarantee coherent results from d
st reads. | 269 // 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 Loading... |
495 int fGpuTrac
eMarkerCount; | 485 int fGpuTrac
eMarkerCount; |
496 GrTraceMarkerSet fActiveT
raceMarkers; | 486 GrTraceMarkerSet fActiveT
raceMarkers; |
497 GrTraceMarkerSet fStoredT
raceMarkers; | 487 GrTraceMarkerSet fStoredT
raceMarkers; |
498 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 488 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
499 GrContext* fContext
; | 489 GrContext* fContext
; |
500 | 490 |
501 typedef SkRefCnt INHERITED; | 491 typedef SkRefCnt INHERITED; |
502 }; | 492 }; |
503 | 493 |
504 #endif | 494 #endif |
OLD | NEW |