LCOV - code coverage report
Current view: top level - svx/source/svdraw - svdoopengl.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 22 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 8 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  */
       9             : 
      10             : #include <config_features.h>
      11             : 
      12             : #include <svdoopengl.hxx>
      13             : #include <sdr/contact/viewcontactofopenglobj.hxx>
      14             : 
      15             : #include <vcl/opengl/IOpenGLRenderer.hxx>
      16             : 
      17           0 : SdrOpenGLObj::SdrOpenGLObj()
      18             :   : SdrObject(),
      19             :     IOpenGLInfoProvider(),
      20           0 :     mpContext(NULL)
      21             : {
      22             : #if HAVE_FEATURE_DESKTOP
      23           0 :     mpContext = new OpenGLContext;
      24             : #endif
      25           0 : }
      26             : 
      27           0 : SdrOpenGLObj::~SdrOpenGLObj()
      28             : {
      29           0 :     delete mpContext;
      30           0 : }
      31             : 
      32           0 : sdr::contact::ViewContact* SdrOpenGLObj::CreateObjectSpecificViewContact()
      33             : {
      34           0 :     return new sdr::contact::ViewContactOfOpenGLObj(*this);
      35             : }
      36             : 
      37             : 
      38           0 : void SdrOpenGLObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
      39             : {
      40           0 :     SdrObject::NbcResize(rRef, xFact, yFact);
      41             : 
      42             :     // now pass the information to the OpenGL context
      43           0 :     if (mpContext)
      44           0 :         mpContext->setWinSize(aOutRect.GetSize());
      45             : 
      46             :     SAL_WARN("svx.opengl", "resized opengl drawinglayer object");
      47           0 : }
      48             : 
      49           0 : void SdrOpenGLObj::setRenderer(IOpenGLRenderer* pRenderer)
      50             : {
      51           0 :     mpRenderer.reset(pRenderer);
      52           0 :     mpRenderer->setInfoProvider(this);
      53           0 : }
      54             : 
      55           0 : IOpenGLRenderer* SdrOpenGLObj::getRenderer()
      56             : {
      57           0 :     return mpRenderer.get();
      58             : }
      59             : 
      60           0 : bool SdrOpenGLObj::isOpenGLInitialized()
      61             : {
      62           0 :     return mpContext && mpContext->isInitialized();
      63             : }
      64             : 
      65             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11