Permalink
  
  
  
    
      
  
  
  
    
    
  
    
  
    
      
  
    
  
  
        
          
  
              
        
  
    
  
  
        
          
  
  
    
  
  
        
          
  
  
    
  
  
        
          
  
  
    
  
  
        
          
  
                
      
        
  
    
  
  
        
          
  
  
    
  
  
        
          
  
  
  
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
  
  Browse files
    
        
  
    
    
  
  
    
  
 
    
    
  
  
    
     
  
  
      
      Merge pull request #6084 from junov/add_willReadFrequently
    
    Add willReadFrequently to 2d canvas contexts, where appropriate.
- Loading branch information
    
    Showing
      
    with
    10 additions
    and 8 deletions.
  
  - +2 −0 draftlogs/6084_change.md
- +1 −1 src/components/images/draw.js
- +1 −1 src/plots/gl2d/scene2d.js
- +1 −1 src/plots/gl3d/scene.js
- +1 −1 src/snapshot/svgtoimg.js
- +1 −1 src/traces/image/hover.js
- +3 −3 src/traces/image/plot.js
There are no files selected for viewing
  
  
    
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
          | @@ -0,0 +1,2 @@ | ||
| - Use the willReadFrequently 2d context creation attribute to optimize readback performance [[#6084](https://github.com/plotly/plotly.js/pull/6084)], | ||
| with thanks to @junov for the contribution! | 
  
  
    
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
          
  
  
    
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
          
  
  
    
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
          
  
  
    
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
          | @@ -33,7 +33,7 @@ function svgToImg(opts) { | ||
| var w1 = scale * w0; | ||
| var h1 = scale * h0; | ||
|  | ||
| var ctx = canvas.getContext('2d', {willReadFrequently: true}); | ||
| var img = new Image(); | ||
| var svgBlob, url; | ||
|  | ||
  
  
    
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
          
  
  
    
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters