Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(503)

Side by Side Diff: src/gpu/gl/GrGLCaps.h

Issue 1144433002: Move copy-surface-as-draw fallback to GrGLGpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@vares
Patch Set: remove incorrect assert Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrTest.cpp ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 return fFormat == rhs.fFormat 367 return fFormat == rhs.fFormat
368 && fType == rhs.fType 368 && fType == rhs.fType
369 && fFboFormat == rhs.fFboFormat; 369 && fFboFormat == rhs.fFboFormat;
370 } 370 }
371 }; 371 };
372 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach e; 372 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach e;
373 373
374 typedef GrDrawTargetCaps INHERITED; 374 typedef GrDrawTargetCaps INHERITED;
375 }; 375 };
376 376
377 #include "GrGLSL.h"
377 378
378 class GrGLSLCaps : public GrShaderCaps { 379 class GrGLSLCaps : public GrShaderCaps {
379 public: 380 public:
380 SK_DECLARE_INST_COUNT(GrGLSLCaps) 381 SK_DECLARE_INST_COUNT(GrGLSLCaps)
381 382
382 /** 383 /**
383 * Indicates how GLSL must interact with advanced blend equations. The KHR ex tension requires 384 * Indicates how GLSL must interact with advanced blend equations. The KHR ex tension requires
384 * special layout qualifiers in the fragment shader. 385 * special layout qualifiers in the fragment shader.
385 */ 386 */
386 enum AdvBlendEqInteraction { 387 enum AdvBlendEqInteraction {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 432
432 AdvBlendEqInteraction advBlendEqInteraction() const { return fAdvBlendEqInte raction; } 433 AdvBlendEqInteraction advBlendEqInteraction() const { return fAdvBlendEqInte raction; }
433 434
434 bool mustEnableAdvBlendEqs() const { 435 bool mustEnableAdvBlendEqs() const {
435 return fAdvBlendEqInteraction >= kGeneralEnable_AdvBlendEqInteraction; 436 return fAdvBlendEqInteraction >= kGeneralEnable_AdvBlendEqInteraction;
436 } 437 }
437 438
438 bool mustEnableSpecificAdvBlendEqs() const { 439 bool mustEnableSpecificAdvBlendEqs() const {
439 return fAdvBlendEqInteraction == kSpecificEnables_AdvBlendEqInteraction; 440 return fAdvBlendEqInteraction == kSpecificEnables_AdvBlendEqInteraction;
440 } 441 }
442
443 bool mustDeclareFragmentShaderOutput() const {
444 return fGLSLGeneration > k110_GrGLSLGeneration;
445 }
446
447 GrGLSLGeneration generation() const { return fGLSLGeneration; }
441 448
442 /** 449 /**
443 * Returns a string containing the caps info. 450 * Returns a string containing the caps info.
444 */ 451 */
445 SkString dump() const override; 452 SkString dump() const override;
446 453
447 private: 454 private:
448 // Must be called after fGeometryShaderSupport is initialized. 455 // Must be called after fGeometryShaderSupport is initialized.
449 void initShaderPrecisionTable(const GrGLContextInfo&, const GrGLInterface*); 456 void initShaderPrecisionTable(const GrGLContextInfo&, const GrGLInterface*);
450 457
458 GrGLSLGeneration fGLSLGeneration;
459
451 bool fDropsTileOnZeroDivide : 1; 460 bool fDropsTileOnZeroDivide : 1;
452 bool fFBFetchSupport : 1; 461 bool fFBFetchSupport : 1;
453 bool fFBFetchNeedsCustomOutput : 1; 462 bool fFBFetchNeedsCustomOutput : 1;
454 463
455 const char* fFBFetchColorName; 464 const char* fFBFetchColorName;
456 const char* fFBFetchExtensionString; 465 const char* fFBFetchExtensionString;
457 466
458 AdvBlendEqInteraction fAdvBlendEqInteraction; 467 AdvBlendEqInteraction fAdvBlendEqInteraction;
459 468
460 typedef GrShaderCaps INHERITED; 469 typedef GrShaderCaps INHERITED;
461 }; 470 };
462 471
463 472
464 #endif 473 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrTest.cpp ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698