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

Unified Diff: webkit/api/src/WebImageCG.cpp

Issue 155172: Start using WebCursorInfo from the WebKit API. WebCursorInfo is a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/api/src/WebCursorInfo.cpp ('k') | webkit/api/src/WebImageSkia.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/api/src/WebImageCG.cpp
===================================================================
--- webkit/api/src/WebImageCG.cpp (revision 20148)
+++ webkit/api/src/WebImageCG.cpp (working copy)
@@ -36,6 +36,7 @@
#include "WebData.h"
#include "WebSize.h"
+#include "Image.h"
#include "ImageSource.h"
#include "SharedBuffer.h"
#include <wtf/PassRefPtr.h>
@@ -83,6 +84,22 @@
return WebSize(CGImageGetWidth(m_imageRef), CGImageGetHeight(m_imageRef));
}
+WebImage::WebImage(const PassRefPtr<Image>& image)
+ : m_imageRef(0)
+{
+ if (image.get())
+ assign(image->nativeImageForCurrentFrame());
+}
+
+WebImage& WebImage::operator=(const PassRefPtr<Image>& image)
+{
+ if (image.get())
+ assign(image->nativeImageForCurrentFrame());
+ else
+ reset();
+ return *this;
+}
+
void WebImage::assign(CGImageRef imageRef)
{
CGImageRelease(m_imageRef);
« no previous file with comments | « webkit/api/src/WebCursorInfo.cpp ('k') | webkit/api/src/WebImageSkia.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698