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

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

Issue 1142003003: Revert of Move copy-surface-as-draw fallback to GrGLGpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@vares
Patch Set: 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"
378 377
379 class GrGLSLCaps : public GrShaderCaps { 378 class GrGLSLCaps : public GrShaderCaps {
380 public: 379 public:
381 SK_DECLARE_INST_COUNT(GrGLSLCaps) 380 SK_DECLARE_INST_COUNT(GrGLSLCaps)
382 381
383 /** 382 /**
384 * Indicates how GLSL must interact with advanced blend equations. The KHR ex tension requires 383 * Indicates how GLSL must interact with advanced blend equations. The KHR ex tension requires
385 * special layout qualifiers in the fragment shader. 384 * special layout qualifiers in the fragment shader.
386 */ 385 */
387 enum AdvBlendEqInteraction { 386 enum AdvBlendEqInteraction {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 431
433 AdvBlendEqInteraction advBlendEqInteraction() const { return fAdvBlendEqInte raction; } 432 AdvBlendEqInteraction advBlendEqInteraction() const { return fAdvBlendEqInte raction; }
434 433
435 bool mustEnableAdvBlendEqs() const { 434 bool mustEnableAdvBlendEqs() const {
436 return fAdvBlendEqInteraction >= kGeneralEnable_AdvBlendEqInteraction; 435 return fAdvBlendEqInteraction >= kGeneralEnable_AdvBlendEqInteraction;
437 } 436 }
438 437
439 bool mustEnableSpecificAdvBlendEqs() const { 438 bool mustEnableSpecificAdvBlendEqs() const {
440 return fAdvBlendEqInteraction == kSpecificEnables_AdvBlendEqInteraction; 439 return fAdvBlendEqInteraction == kSpecificEnables_AdvBlendEqInteraction;
441 } 440 }
442
443 bool mustDeclareFragmentShaderOutput() const {
444 return fGLSLGeneration > k110_GrGLSLGeneration;
445 }
446
447 GrGLSLGeneration generation() const { return fGLSLGeneration; }
448 441
449 /** 442 /**
450 * Returns a string containing the caps info. 443 * Returns a string containing the caps info.
451 */ 444 */
452 SkString dump() const override; 445 SkString dump() const override;
453 446
454 private: 447 private:
455 // Must be called after fGeometryShaderSupport is initialized. 448 // Must be called after fGeometryShaderSupport is initialized.
456 void initShaderPrecisionTable(const GrGLContextInfo&, const GrGLInterface*); 449 void initShaderPrecisionTable(const GrGLContextInfo&, const GrGLInterface*);
457 450
458 GrGLSLGeneration fGLSLGeneration;
459
460 bool fDropsTileOnZeroDivide : 1; 451 bool fDropsTileOnZeroDivide : 1;
461 bool fFBFetchSupport : 1; 452 bool fFBFetchSupport : 1;
462 bool fFBFetchNeedsCustomOutput : 1; 453 bool fFBFetchNeedsCustomOutput : 1;
463 454
464 const char* fFBFetchColorName; 455 const char* fFBFetchColorName;
465 const char* fFBFetchExtensionString; 456 const char* fFBFetchExtensionString;
466 457
467 AdvBlendEqInteraction fAdvBlendEqInteraction; 458 AdvBlendEqInteraction fAdvBlendEqInteraction;
468 459
469 typedef GrShaderCaps INHERITED; 460 typedef GrShaderCaps INHERITED;
470 }; 461 };
471 462
472 463
473 #endif 464 #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