| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 | 8 |
| 9 #ifndef GrGLCaps_DEFINED | 9 #ifndef GrGLCaps_DEFINED |
| 10 #define GrGLCaps_DEFINED | 10 #define GrGLCaps_DEFINED |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 | 392 |
| 393 /** | 393 /** |
| 394 * Resets the caps such that nothing is supported. | 394 * Resets the caps such that nothing is supported. |
| 395 */ | 395 */ |
| 396 void reset() override; | 396 void reset() override; |
| 397 | 397 |
| 398 /** | 398 /** |
| 399 * Initializes the GrGLSLCaps to the set of features supported in the curren
t | 399 * Initializes the GrGLSLCaps to the set of features supported in the curren
t |
| 400 * OpenGL context accessible via ctxInfo. | 400 * OpenGL context accessible via ctxInfo. |
| 401 */ | 401 */ |
| 402 bool init(const GrGLContextInfo& ctxInfo, const GrGLInterface* glInterface); | 402 bool init(const GrGLContextInfo&, const GrGLInterface*, const GrGLCaps&); |
| 403 | 403 |
| 404 /** | 404 /** |
| 405 * Some helper functions for encapsulating various extensions to read FB Buf
fer on openglES | 405 * Some helper functions for encapsulating various extensions to read FB Buf
fer on openglES |
| 406 * | 406 * |
| 407 * TODO(joshualitt) On desktop opengl 4.2+ we can achieve something similar
to this effect | 407 * TODO(joshualitt) On desktop opengl 4.2+ we can achieve something similar
to this effect |
| 408 */ | 408 */ |
| 409 bool fbFetchSupport() const { return fFBFetchSupport; } | 409 bool fbFetchSupport() const { return fFBFetchSupport; } |
| 410 | 410 |
| 411 bool fbFetchNeedsCustomOutput() const { return fFBFetchNeedsCustomOutput; } | 411 bool fbFetchNeedsCustomOutput() const { return fFBFetchNeedsCustomOutput; } |
| 412 | 412 |
| 413 const char* fbFetchColorName() const { return fFBFetchColorName; } | 413 const char* fbFetchColorName() const { return fFBFetchColorName; } |
| 414 | 414 |
| 415 const char* fbFetchExtensionString() const { return fFBFetchExtensionString;
} | 415 const char* fbFetchExtensionString() const { return fFBFetchExtensionString;
} |
| 416 | 416 |
| 417 bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; } | 417 bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; } |
| 418 | 418 |
| 419 bool mustEnableAdvancedBlendEquations() const { return fMustEnableAdvancedBl
endEquations; } |
| 420 |
| 419 /** | 421 /** |
| 420 * Returns a string containing the caps info. | 422 * Returns a string containing the caps info. |
| 421 */ | 423 */ |
| 422 SkString dump() const override; | 424 SkString dump() const override; |
| 423 | 425 |
| 424 private: | 426 private: |
| 425 // Must be called after fGeometryShaderSupport is initialized. | 427 // Must be called after fGeometryShaderSupport is initialized. |
| 426 void initShaderPrecisionTable(const GrGLContextInfo&, const GrGLInterface*); | 428 void initShaderPrecisionTable(const GrGLContextInfo&, const GrGLInterface*); |
| 427 | 429 |
| 428 bool fDropsTileOnZeroDivide : 1; | 430 bool fDropsTileOnZeroDivide : 1; |
| 429 bool fFBFetchSupport : 1; | 431 bool fFBFetchSupport : 1; |
| 430 bool fFBFetchNeedsCustomOutput : 1; | 432 bool fFBFetchNeedsCustomOutput : 1; |
| 433 bool fMustEnableAdvancedBlendEquations : 1; |
| 431 | 434 |
| 432 const char* fFBFetchColorName; | 435 const char* fFBFetchColorName; |
| 433 const char* fFBFetchExtensionString; | 436 const char* fFBFetchExtensionString; |
| 434 | 437 |
| 435 typedef GrShaderCaps INHERITED; | 438 typedef GrShaderCaps INHERITED; |
| 436 }; | 439 }; |
| 437 | 440 |
| 438 | 441 |
| 439 #endif | 442 #endif |
| OLD | NEW |