use computeSize64 instead of getSize
This commit is contained in:
		
					parent
					
						
							
								8d1c17e036
							
						
					
				
			
			
				commit
				
					
						6f80379b30
					
				
			
		
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -204,7 +204,7 @@ NativeImage::NativeImage(v8::Isolate* isolate, const gfx::Image& image)
 | 
				
			||||||
  Init(isolate);
 | 
					  Init(isolate);
 | 
				
			||||||
  if (image_.HasRepresentation(gfx::Image::kImageRepSkia)) {
 | 
					  if (image_.HasRepresentation(gfx::Image::kImageRepSkia)) {
 | 
				
			||||||
    isolate->AdjustAmountOfExternalAllocatedMemory(
 | 
					    isolate->AdjustAmountOfExternalAllocatedMemory(
 | 
				
			||||||
      image_.ToImageSkia()->bitmap()->getSize());
 | 
					      image_.ToImageSkia()->bitmap()->computeSize64());
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  MarkHighMemoryUsage();
 | 
					  MarkHighMemoryUsage();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -218,7 +218,7 @@ NativeImage::NativeImage(v8::Isolate* isolate, const base::FilePath& hicon_path)
 | 
				
			||||||
  image_ = gfx::Image(image_skia);
 | 
					  image_ = gfx::Image(image_skia);
 | 
				
			||||||
  Init(isolate);
 | 
					  Init(isolate);
 | 
				
			||||||
  isolate->AdjustAmountOfExternalAllocatedMemory(
 | 
					  isolate->AdjustAmountOfExternalAllocatedMemory(
 | 
				
			||||||
    image_.ToImageSkia()->bitmap()->getSize());
 | 
					    image_.ToImageSkia()->bitmap()->computeSize64());
 | 
				
			||||||
  MarkHighMemoryUsage();
 | 
					  MarkHighMemoryUsage();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					@ -226,7 +226,7 @@ NativeImage::NativeImage(v8::Isolate* isolate, const base::FilePath& hicon_path)
 | 
				
			||||||
NativeImage::~NativeImage() {
 | 
					NativeImage::~NativeImage() {
 | 
				
			||||||
  if (image_.HasRepresentation(gfx::Image::kImageRepSkia)) {
 | 
					  if (image_.HasRepresentation(gfx::Image::kImageRepSkia)) {
 | 
				
			||||||
    isolate()->AdjustAmountOfExternalAllocatedMemory(
 | 
					    isolate()->AdjustAmountOfExternalAllocatedMemory(
 | 
				
			||||||
      - static_cast<int64_t>(image_.ToImageSkia()->bitmap()->getSize()));
 | 
					      - image_.ToImageSkia()->bitmap()->computeSize64());
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue