equal
deleted
inserted
replaced
448 // Much easier if no rotation ! |
448 // Much easier if no rotation ! |
449 vgGetPixels(iImage, 0, 0, renderBufferLocation.iTl.iX, displayHeight - renderBufferLocation.iTl.iY - rotatedSize.iHeight, rotatedSize.iWidth, rotatedSize.iHeight); |
449 vgGetPixels(iImage, 0, 0, renderBufferLocation.iTl.iX, displayHeight - renderBufferLocation.iTl.iY - rotatedSize.iHeight, rotatedSize.iWidth, rotatedSize.iHeight); |
450 } |
450 } |
451 } |
451 } |
452 |
452 |
|
453 void CHuiVg10CanvasRenderBuffer::InitializeL(const TSize& aSize, TBool aForceClear) |
|
454 { |
|
455 if (!IsInitialized()) |
|
456 { |
|
457 InitializeL(aSize); |
|
458 } |
|
459 else |
|
460 { |
|
461 if (aForceClear) |
|
462 { |
|
463 CHuiVg10RenderPlugin& renderer = CHuiStatic::Vg10Renderer(); |
|
464 |
|
465 // Reinitialize the context |
|
466 PushEGLContext(); |
|
467 |
|
468 Bind(); |
|
469 iGc->InitState(); |
|
470 |
|
471 VGfloat color[] = |
|
472 { |
|
473 0.f, 0.f, 0.f, 0.f |
|
474 }; |
|
475 vgSetfv(VG_CLEAR_COLOR, sizeof(color) / sizeof(VGfloat), color); |
|
476 vgClear(0, 0, iSize.iWidth, iSize.iHeight); |
|
477 UnBind(); |
|
478 |
|
479 // Let renderer know that we have been fiddlling with OpenVg state directly |
|
480 // "iGc->InitState" confuses scissoring setting, so lets notify it. |
|
481 renderer.AddRestoreStateFlags(EHuiVg10GcStateFlagDirtyScissor); |
|
482 renderer.AddRestoreStateFlags(EHuiVg10GcStateFlagDirtyBlendMode); |
|
483 |
|
484 PopEGLContext(); |
|
485 } |
|
486 } |
|
487 } |
|
488 |