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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 GrGpu::kGpuPrefersDraw_DrawPreference); | 505 GrGpu::kGpuPrefersDraw_DrawPreference); |
506 *preference = SkTMax(*preference, elevation); | 506 *preference = SkTMax(*preference, elevation); |
507 } | 507 } |
508 | 508 |
509 void handleDirtyContext() { | 509 void handleDirtyContext() { |
510 if (fResetBits) { | 510 if (fResetBits) { |
511 this->resetContext(); | 511 this->resetContext(); |
512 } | 512 } |
513 } | 513 } |
514 | 514 |
| 515 // Handles cases where a surface will be updated without a call to flushRend
erTarget |
| 516 void didWriteToSurface(GrSurface* surface, const SkIRect* bounds, uint32_t m
ipLevels = 1) const; |
| 517 |
515 Stats fStats; | 518 Stats fStats; |
516 SkAutoTDelete<GrPathRendering> fPathRendering; | 519 SkAutoTDelete<GrPathRendering> fPathRendering; |
517 // Subclass must initialize this in its constructor. | 520 // Subclass must initialize this in its constructor. |
518 SkAutoTUnref<const GrCaps> fCaps; | 521 SkAutoTUnref<const GrCaps> fCaps; |
519 | 522 |
520 private: | 523 private: |
521 // called when the 3D context state is unknown. Subclass should emit any | 524 // called when the 3D context state is unknown. Subclass should emit any |
522 // assumed 3D context state and dirty any state cache. | 525 // assumed 3D context state and dirty any state cache. |
523 virtual void onResetContext(uint32_t resetBits) = 0; | 526 virtual void onResetContext(uint32_t resetBits) = 0; |
524 | 527 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; | 614 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; |
612 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; | 615 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; |
613 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 616 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
614 GrContext* fContext
; | 617 GrContext* fContext
; |
615 | 618 |
616 friend class GrPathRendering; | 619 friend class GrPathRendering; |
617 typedef SkRefCnt INHERITED; | 620 typedef SkRefCnt INHERITED; |
618 }; | 621 }; |
619 | 622 |
620 #endif | 623 #endif |
OLD | NEW |