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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 * is called. | 353 * is called. |
354 */ | 354 */ |
355 void saveActiveTraceMarkers(); | 355 void saveActiveTraceMarkers(); |
356 void restoreActiveTraceMarkers(); | 356 void restoreActiveTraceMarkers(); |
357 | 357 |
358 // Called to determine whether an onCopySurface call would succeed or not. T
his is useful for | 358 // Called to determine whether an onCopySurface call would succeed or not. T
his is useful for |
359 // proxy subclasses to test whether the copy would succeed without executing
it yet. Derived | 359 // proxy subclasses to test whether the copy would succeed without executing
it yet. Derived |
360 // classes must keep this consistent with their implementation of onCopySurf
ace(). The inputs | 360 // classes must keep this consistent with their implementation of onCopySurf
ace(). The inputs |
361 // are the same as onCopySurface(), i.e. srcRect and dstPoint are clipped to
be inside the src | 361 // are the same as onCopySurface(), i.e. srcRect and dstPoint are clipped to
be inside the src |
362 // and dst bounds. | 362 // and dst bounds. |
363 virtual bool canCopySurface(GrSurface* dst, | 363 virtual bool canCopySurface(const GrSurface* dst, |
364 GrSurface* src, | 364 const GrSurface* src, |
365 const SkIRect& srcRect, | 365 const SkIRect& srcRect, |
366 const SkIPoint& dstPoint) = 0; | 366 const SkIPoint& dstPoint) = 0; |
367 | 367 |
368 // This method is called by copySurface The srcRect is guaranteed to be ent
irely within the | 368 // This method is called by copySurface The srcRect is guaranteed to be ent
irely within the |
369 // src bounds. Likewise, the dst rect implied by dstPoint and srcRect's widt
h and height falls | 369 // src bounds. Likewise, the dst rect implied by dstPoint and srcRect's widt
h and height falls |
370 // entirely within the dst. The default implementation will draw a rect from
the src to the | 370 // entirely within the dst. The default implementation will draw a rect from
the src to the |
371 // dst if the src is a texture and the dst is a render target and fail other
wise. | 371 // dst if the src is a texture and the dst is a render target and fail other
wise. |
372 virtual bool copySurface(GrSurface* dst, | 372 virtual bool copySurface(GrSurface* dst, |
373 GrSurface* src, | 373 GrSurface* src, |
374 const SkIRect& srcRect, | 374 const SkIRect& srcRect, |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 int fGpuTrac
eMarkerCount; | 563 int fGpuTrac
eMarkerCount; |
564 GrTraceMarkerSet fActiveT
raceMarkers; | 564 GrTraceMarkerSet fActiveT
raceMarkers; |
565 GrTraceMarkerSet fStoredT
raceMarkers; | 565 GrTraceMarkerSet fStoredT
raceMarkers; |
566 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 566 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
567 GrContext* fContext
; | 567 GrContext* fContext
; |
568 | 568 |
569 typedef SkRefCnt INHERITED; | 569 typedef SkRefCnt INHERITED; |
570 }; | 570 }; |
571 | 571 |
572 #endif | 572 #endif |
OLD | NEW |