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 GrGLGpu_DEFINED | 8 #ifndef GrGLGpu_DEFINED |
9 #define GrGLGpu_DEFINED | 9 #define GrGLGpu_DEFINED |
10 | 10 |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 fEnabled = kUnknown_TriState; | 423 fEnabled = kUnknown_TriState; |
424 fRect.invalidate(); | 424 fRect.invalidate(); |
425 } | 425 } |
426 } fHWScissorSettings; | 426 } fHWScissorSettings; |
427 | 427 |
428 class { | 428 class { |
429 public: | 429 public: |
430 bool valid() const { return kInvalidSurfaceOrigin != fRTOrigin; } | 430 bool valid() const { return kInvalidSurfaceOrigin != fRTOrigin; } |
431 void invalidate() { fRTOrigin = kInvalidSurfaceOrigin; } | 431 void invalidate() { fRTOrigin = kInvalidSurfaceOrigin; } |
432 bool knownDisabled() const { return this->valid() && !fWindowState.enabl
ed(); } | 432 bool knownDisabled() const { return this->valid() && !fWindowState.enabl
ed(); } |
433 void setDisabled() { fRTOrigin = kDefault_GrSurfaceOrigin, fWindowState.
setDisabled(); } | 433 void setDisabled() { |
| 434 fRTOrigin = kDefault_GrSurfaceOrigin; |
| 435 fWindowState.setDisabled(); |
| 436 } |
434 | 437 |
435 void set(GrSurfaceOrigin rtOrigin, const GrGLIRect& viewport, | 438 void set(GrSurfaceOrigin rtOrigin, const GrGLIRect& viewport, |
436 const GrWindowRectsState& windowState) { | 439 const GrWindowRectsState& windowState) { |
437 fRTOrigin = rtOrigin; | 440 fRTOrigin = rtOrigin; |
438 fViewport = viewport; | 441 fViewport = viewport; |
439 fWindowState = windowState; | 442 fWindowState = windowState; |
440 } | 443 } |
441 | 444 |
442 bool knownEqualTo(GrSurfaceOrigin rtOrigin, const GrGLIRect& viewport, | 445 bool knownEqualTo(GrSurfaceOrigin rtOrigin, const GrGLIRect& viewport, |
443 const GrWindowRectsState& windowState) const { | 446 const GrWindowRectsState& windowState) const { |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 bool fPLSHasBeenUsed; | 638 bool fPLSHasBeenUsed; |
636 | 639 |
637 float fHWMinSampleShading; | 640 float fHWMinSampleShading; |
638 | 641 |
639 typedef GrGpu INHERITED; | 642 typedef GrGpu INHERITED; |
640 friend class GrGLPathRendering; // For accessing setTextureUnit. | 643 friend class GrGLPathRendering; // For accessing setTextureUnit. |
641 friend class gr_instanced::GLInstancedRendering; // For accessing flushGLSta
te. | 644 friend class gr_instanced::GLInstancedRendering; // For accessing flushGLSta
te. |
642 }; | 645 }; |
643 | 646 |
644 #endif | 647 #endif |
OLD | NEW |