bool SkOSWindow::onEvent(const SkEvent& evt) { if (evt.isType("inval-imageview")) { this->update(NULL); const SkBitmap& bm = this->getBitmap(); CGImageRef img = SkCreateCGImageRef(bm); HIImageViewSetImage((HIViewRef)getHVIEW(), img); CGImageRelease(img); return true; } return INHERITED::onEvent(evt); }
bool SkOSWindow::onEvent(const SkEvent& evt) { if (evt.isType("inval-imageview")) { this->update(NULL); SkEvent query("ignore-window-bitmap"); if (!this->doQuery(&query) || !query.getFast32()) { const SkBitmap& bm = this->getBitmap(); CGImageRef img = SkCreateCGImageRef(bm); HIImageViewSetImage((HIViewRef)getHVIEW(), img); CGImageRelease(img); } return true; } return INHERITED::onEvent(evt); }