本文整理汇总了C++中webcore::Frame::tiledBackingStore方法的典型用法代码示例。如果您正苦于以下问题:C++ Frame::tiledBackingStore方法的具体用法?C++ Frame::tiledBackingStore怎么用?C++ Frame::tiledBackingStore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webcore::Frame
的用法示例。
在下文中一共展示了Frame::tiledBackingStore方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _ewk_view_single_smart_repaints_process
static Eina_Bool _ewk_view_single_smart_repaints_process(Ewk_View_Smart_Data* smartData)
{
if (smartData->animated_zoom.zoom.current < 0.00001) {
Evas_Object* clip = evas_object_clip_get(smartData->backing_store);
// reset effects of zoom_weak_set()
evas_object_image_fill_set(smartData->backing_store, 0, 0, smartData->view.w, smartData->view.h);
evas_object_move(clip, smartData->view.x, smartData->view.y);
Evas_Coord width = smartData->view.w;
Evas_Coord height = smartData->view.h;
Evas_Coord centerWidth, centerHeight;
ewk_frame_contents_size_get(smartData->main_frame, ¢erWidth, ¢erHeight);
if (width > centerWidth)
width = centerWidth;
if (height > centerHeight)
height = centerHeight;
evas_object_resize(clip, width, height);
}
Evas_Coord imageWidth, imageHeight;
evas_object_image_size_get(smartData->backing_store, &imageWidth, &imageHeight);
Eina_Tiler* tiler = eina_tiler_new(imageWidth, imageHeight);
if (!tiler) {
ERR("could not create tiler %dx%d", imageWidth, imageHeight);
return false;
}
ewk_view_layout_if_needed_recursive(smartData->_priv);
size_t count;
const Eina_Rectangle* paintRequest = ewk_view_repaints_pop(smartData->_priv, &count);
const Eina_Rectangle* paintRequestEnd = paintRequest + count;
for (; paintRequest < paintRequestEnd; paintRequest++)
eina_tiler_rect_add(tiler, paintRequest);
Eina_Iterator* iterator = eina_tiler_iterator_new(tiler);
if (!iterator) {
ERR("could not get iterator for tiler");
eina_tiler_free(tiler);
return false;
}
#if USE(TILED_BACKING_STORE)
WebCore::Frame* mainFrame = EWKPrivate::coreFrame(smartData->main_frame);
if (mainFrame && mainFrame->tiledBackingStore())
mainFrame->tiledBackingStore()->coverWithTilesIfNeeded();
#endif
Ewk_Paint_Context* context = ewk_paint_context_from_image_new(smartData->backing_store);
ewk_paint_context_save(context);
Eina_Rectangle* rect;
EINA_ITERATOR_FOREACH(iterator, rect) {
ewk_view_paint(smartData->_priv, context, rect);
evas_object_image_data_update_add(smartData->backing_store, rect->x, rect->y, rect->w, rect->h);
}