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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 | 397 |
398 // width and height may be larger than rt (if underlying API allows it). | 398 // width and height may be larger than rt (if underlying API allows it). |
399 // Returns nullptr if compatible sb could not be created, otherwise the call
er owns the ref on | 399 // Returns nullptr if compatible sb could not be created, otherwise the call
er owns the ref on |
400 // the GrStencilAttachment. | 400 // the GrStencilAttachment. |
401 virtual GrStencilAttachment* createStencilAttachmentForRenderTarget(const Gr
RenderTarget*, | 401 virtual GrStencilAttachment* createStencilAttachmentForRenderTarget(const Gr
RenderTarget*, |
402 int widt
h, | 402 int widt
h, |
403 int heig
ht) = 0; | 403 int heig
ht) = 0; |
404 // clears target's entire stencil buffer to 0 | 404 // clears target's entire stencil buffer to 0 |
405 virtual void clearStencil(GrRenderTarget* target) = 0; | 405 virtual void clearStencil(GrRenderTarget* target) = 0; |
406 | 406 |
| 407 // draws an outline rectangle for debugging/visualization purposes. |
| 408 virtual void drawDebugWireRect(GrRenderTarget*, const SkIRect&, GrColor) = 0
; |
407 | 409 |
408 // Determines whether a copy of a texture must be made in order to be compat
ible with | 410 // Determines whether a copy of a texture must be made in order to be compat
ible with |
409 // a given GrTextureParams. If so, the width, height and filter used for the
copy are | 411 // a given GrTextureParams. If so, the width, height and filter used for the
copy are |
410 // output via the CopyParams. | 412 // output via the CopyParams. |
411 bool makeCopyForTextureParams(int width, int height, const GrTextureParams&, | 413 bool makeCopyForTextureParams(int width, int height, const GrTextureParams&, |
412 GrTextureProducer::CopyParams*) const; | 414 GrTextureProducer::CopyParams*) const; |
413 | 415 |
414 // This is only to be used in GL-specific tests. | 416 // This is only to be used in GL-specific tests. |
415 virtual const GrGLContext* glContextForTesting() const { return nullptr; } | 417 virtual const GrGLContext* glContextForTesting() const { return nullptr; } |
416 | 418 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 ResetTimestamp fResetTi
mestamp; | 526 ResetTimestamp fResetTi
mestamp; |
525 uint32_t fResetBi
ts; | 527 uint32_t fResetBi
ts; |
526 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 528 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
527 GrContext* fContext
; | 529 GrContext* fContext
; |
528 | 530 |
529 friend class GrPathRendering; | 531 friend class GrPathRendering; |
530 typedef SkRefCnt INHERITED; | 532 typedef SkRefCnt INHERITED; |
531 }; | 533 }; |
532 | 534 |
533 #endif | 535 #endif |
OLD | NEW |