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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 // Returns a timestamp based on the number of times the context was reset. | 260 // Returns a timestamp based on the number of times the context was reset. |
261 // This timestamp can be used to lazily detect when cached 3D context state | 261 // This timestamp can be used to lazily detect when cached 3D context state |
262 // is dirty. | 262 // is dirty. |
263 ResetTimestamp getResetTimestamp() const { return fResetTimestamp; } | 263 ResetTimestamp getResetTimestamp() const { return fResetTimestamp; } |
264 | 264 |
265 virtual void buildProgramDesc(GrProgramDesc*, | 265 virtual void buildProgramDesc(GrProgramDesc*, |
266 const GrPrimitiveProcessor&, | 266 const GrPrimitiveProcessor&, |
267 const GrPipeline&, | 267 const GrPipeline&, |
268 const GrBatchTracker&) const = 0; | 268 const GrBatchTracker&) const = 0; |
269 | 269 |
270 // Called to determine whether a copySurface call would succeed or not. Deri
ved | |
271 // classes must keep this consistent with their implementation of onCopySurf
ace(). Fallbacks | |
272 // to issuing a draw from the src to dst take place at the GrDrawTarget leve
l and this function | |
273 // should only return true if a faster copy path exists. The rect and point
are pre-clipped. The | |
274 // src rect and implied dst rect are guaranteed to be within the src/dst bou
nds and non-empty. | |
275 virtual bool canCopySurface(const GrSurface* dst, | |
276 const GrSurface* src, | |
277 const SkIRect& srcRect, | |
278 const SkIPoint& dstPoint) = 0; | |
279 | |
280 // 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 |
281 // 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 |
282 // 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 |
283 // src/dst bounds and non-empty. | 273 // src/dst bounds and non-empty. |
284 virtual bool copySurface(GrSurface* dst, | 274 virtual bool copySurface(GrSurface* dst, |
285 GrSurface* src, | 275 GrSurface* src, |
286 const SkIRect& srcRect, | 276 const SkIRect& srcRect, |
287 const SkIPoint& dstPoint) = 0; | 277 const SkIPoint& dstPoint) = 0; |
288 | 278 |
289 // 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 GrTraceMarkerSet fActiveT
raceMarkers; | 466 GrTraceMarkerSet fActiveT
raceMarkers; |
477 GrTraceMarkerSet fStoredT
raceMarkers; | 467 GrTraceMarkerSet fStoredT
raceMarkers; |
478 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 468 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
479 GrContext* fContext
; | 469 GrContext* fContext
; |
480 | 470 |
481 friend class GrPathRendering; | 471 friend class GrPathRendering; |
482 typedef SkRefCnt INHERITED; | 472 typedef SkRefCnt INHERITED; |
483 }; | 473 }; |
484 | 474 |
485 #endif | 475 #endif |
OLD | NEW |