void NUIRenderHandler::OnPaint(CefRefPtr<CefBrowser> browser, PaintElementType type, const RectList& dirtyRects, const void* buffer, int width, int height) { // OnPaint shouldn't be reached anymore //assert(!"NUIRenderHandler::OnPaint"); return; if (m_owner->GetWindowValid()) { // lock the window lock auto& lock = m_owner->GetWindowLock(); lock.lock(); // paint the buffer if (type == PET_VIEW) { PaintView(dirtyRects, buffer, width, height); } else if (type == PET_POPUP) { PaintPopup(buffer, width, height); } // invalidate and paint the popup UpdatePopup(); // mark the render buffer as dirty m_owner->GetWindow()->MarkRenderBufferDirty(); // unlock the lock lock.unlock(); } }
void EListPort::UpdateView() { if (OldLeftCol != LeftCol || OldTopRow != TopRow || OldCount != List->Count) List->NeedsRedraw = List->NeedsUpdate = 1; if (List->NeedsUpdate) { List->UpdateList(); List->FixPos(); if (List->View == View) GetPos(); if (OldLeftCol != LeftCol || OldTopRow != TopRow || OldCount != List->Count) List->NeedsRedraw = List->NeedsUpdate = 1; PaintView(List->NeedsRedraw); OldRow = Row; OldTopRow = TopRow; OldLeftCol = LeftCol; OldCount = List->Count; List->NeedsUpdate = 0; List->NeedsRedraw = 0; } }
void EListPort::RepaintView() { PaintView(1); OldRow = Row; OldTopRow = TopRow; OldLeftCol = LeftCol; OldCount = List->Count; List->NeedsUpdate = 0; List->NeedsRedraw = 0; }
void emX11WindowPort::UpdatePainting() { const emClipRects<int>::Rect * r; int i,rx1,ry1,rx2,ry2,x,y,w,h; if (InvalidRects.IsEmpty()) return; InvalidRects.Sort(); for (r=InvalidRects.GetFirst(); r; r=r->GetNext()) { rx1=r->GetX1(); ry1=r->GetY1(); rx2=r->GetX2(); ry2=r->GetY2(); y=ry1; do { h=ry2-y; if (h>Screen.BufHeight) h=Screen.BufHeight; x=rx1; do { w=rx2-x; if (w>Screen.BufWidth) w=Screen.BufWidth; if (Screen.UsingXShm) { for (;;) { if (!Screen.BufActive[0]) { i=0; break; } if (Screen.BufImg[1] && !Screen.BufActive[1]) { i=1; break; } Screen.WaitBufs(); } PaintView(emPainter(Screen.BufPainter[i],0,0,w,h,-x,-y,1,1),0); XMutex.Lock(); XShmPutImage( Disp, Win, Gc, Screen.BufImg[i], 0,0, x-PaneX,y-PaneY, w,h, True ); XFlush(Disp); XMutex.Unlock(); Screen.BufActive[i]=true; } else { PaintView(emPainter(Screen.BufPainter[0],0,0,w,h,-x,-y,1,1),0); XMutex.Lock(); XPutImage( Disp, Win, Gc, Screen.BufImg[0], 0,0, x-PaneX,y-PaneY, w,h ); XMutex.Unlock(); } x+=w; } while (x<rx2); y+=h; } while (y<ry2); } if (Screen.UsingXShm) { while (Screen.BufActive[0] || Screen.BufActive[1]) { Screen.WaitBufs(); } } InvalidRects.Empty(); }