MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / markNVGDirty

Method markNVGDirty

Source/Basic/Director.cpp:565–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

563}
564
565NVGcontext* Director::markNVGDirty() {
566 if (!_nvgContext) {
567 _nvgContext = nvgCreate(1, 0);
568 AssertUnless(_nvgContext, "failed to init NanoVG context!");
569 }
570 if (!_nvgDirty) {
571 _nvgDirty = true;
572 Size visualSize = SharedApplication.getVisualSize();
573 float devicePixelRatio = SharedApplication.getDevicePixelRatio();
574 nvgBeginFrame(_nvgContext, visualSize.width, visualSize.height, devicePixelRatio);
575 }
576 return _nvgContext;
577}
578
579void Director::handleSDLEvent(const SDL_Event& event) {
580 switch (event.type) {

Callers 1

ContextMethod · 0.80

Calls 4

nvgCreateFunction · 0.85
nvgBeginFrameFunction · 0.85
getVisualSizeMethod · 0.80
getDevicePixelRatioMethod · 0.80

Tested by

no test coverage detected