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

Side by Side Diff: Source/core/platform/graphics/BitmapImage.cpp

Issue 105363002: Make SVG images for custom CSS cursors appear sharp on retina displays (Closed) Base URL: http://src.chromium.org/blink/trunk/
Patch Set: Created 7 years 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 | « Source/core/platform/graphics/BitmapImage.h ('k') | Source/core/platform/graphics/Image.h » ('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 (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 return m_source.frameIsCompleteAtIndex(index); 343 return m_source.frameIsCompleteAtIndex(index);
344 } 344 }
345 345
346 float BitmapImage::frameDurationAtIndex(size_t index) 346 float BitmapImage::frameDurationAtIndex(size_t index)
347 { 347 {
348 if (index < m_frames.size() && m_frames[index].m_haveMetadata) 348 if (index < m_frames.size() && m_frames[index].m_haveMetadata)
349 return m_frames[index].m_duration; 349 return m_frames[index].m_duration;
350 return m_source.frameDurationAtIndex(index); 350 return m_source.frameDurationAtIndex(index);
351 } 351 }
352 352
353 PassRefPtr<NativeImageSkia> BitmapImage::nativeImageForCurrentFrame() 353 PassRefPtr<NativeImageSkia> BitmapImage::nativeImageForCurrentFrame(ScaleHint hi nt)
354 { 354 {
355 return frameAtIndex(currentFrame()); 355 return frameAtIndex(currentFrame());
356 } 356 }
357 357
358 bool BitmapImage::frameHasAlphaAtIndex(size_t index) 358 bool BitmapImage::frameHasAlphaAtIndex(size_t index)
359 { 359 {
360 if (m_frames.size() <= index) 360 if (m_frames.size() <= index)
361 return true; 361 return true;
362 362
363 if (m_frames[index].m_haveMetadata) 363 if (m_frames[index].m_haveMetadata)
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 } 603 }
604 return m_isSolidColor && !m_currentFrame; 604 return m_isSolidColor && !m_currentFrame;
605 } 605 }
606 606
607 Color BitmapImage::solidColor() const 607 Color BitmapImage::solidColor() const
608 { 608 {
609 return m_solidColor; 609 return m_solidColor;
610 } 610 }
611 611
612 } 612 }
OLDNEW
« no previous file with comments | « Source/core/platform/graphics/BitmapImage.h ('k') | Source/core/platform/graphics/Image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698