[Webkit-unassigned] [Bug 95917] [chromium] Need a API to upload Android image resources from the embedder

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 6 13:13:50 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=95917





--- Comment #4 from Tien-Ren Chen <trchen at chromium.org>  2012-09-06 13:14:05 PST ---
(In reply to comment #3)
> http://code.google.com/searchframe#OAMlx_jo-ck/src/third_party/WebKit/Source/Platform/chromium/public/Platform.h&exact_package=chromium&q=Platform.h&l=261 exists and it used by, for instance, Image::loadPlatformResource() which looks similar to your need.

Sounds good. I think I don't need WebKit-side change then.

I will do something like this instead:

chrome/webkit/glue/webkitplatformsupport_impl.cc:

WebData WebKitPlatformSupportImpl::loadResource(const char* name) {
    ....
#if defined(OS_ANDROID)
    if (!strncmp(name, "android:drawable/", 17))
        return loadAndroidDrawable(name);
#endif
    ....
}

Or do you prefer me to subclass it as WebKitPlatformSupportImplAndroid?

Another thing I'm not sure about is how to pass a decoded bitmap in WebData. The API seems to be designed to load raw files. I could pack the bitmap in some simple struct then pass it as the WebData payload, but I feel it will become a maintenance WTF later on.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list