コード例 #1
0
void FakeTiledLayerChromium::setTexturePriorities(const CCPriorityCalculator& calculator)
{
    // Ensure there is always a target render surface available. If none has been
    // set (the layer is an orphan for the test), then just set a surface on itself.
    bool missingTargetRenderSurface = !targetRenderSurface();

    if (missingTargetRenderSurface) {
        createRenderSurface();
        setTargetRenderSurface(renderSurface());
    }

    TiledLayerChromium::setTexturePriorities(calculator);

    if (missingTargetRenderSurface) {
        clearRenderSurface();
        setTargetRenderSurface(0);
    }
}
コード例 #2
0
RenderSurface* CreateDefaultSurface( RenderSurface::SurfaceType type, PositionSize positionSize, const std::string& name )
{
  // create a Ecore X11 window by default
  Any surface;
  Any display;

  Internal::Adaptor::ECoreX::RenderSurface* renderSurface(NULL);
  if( RenderSurface::WINDOW == type )
  {
    renderSurface = new Internal::Adaptor::ECoreX::WindowRenderSurface( positionSize, surface, display, name );
  }
  else
  {
    renderSurface = new Internal::Adaptor::ECoreX::PixmapRenderSurface( positionSize, surface, display, name );
  }

  return renderSurface;
}
コード例 #3
0
ファイル: GLXGraphicSystem.cpp プロジェクト: Airtau/genivi
void GLXGraphicsystem::renderSWLayer(Layer *layer, bool clear)
{
    if (clear)
    {
        clearBackground();
    }

    if ( layer->visibility && layer->opacity > 0.0 )
    {
        SurfaceList surfaces = layer->getAllSurfaces();
        beginLayer(layer);
        for(SurfaceListConstIterator currentS = surfaces.begin(); currentS != surfaces.end(); currentS++)
        {
            if ((*currentS)->hasNativeContent() && (*currentS)->visibility && (*currentS)->opacity>0.0f)
            {
                renderSurface(*currentS);
            }
        }
        endLayer();
    }
}
コード例 #4
0
ファイル: Font.cpp プロジェクト: richese/magneto-locator
SDL_Texture * Font::render(const char *text, const Uint16 ptsize)
{
	SDL_Texture *result = nullptr;

	if (!Engine::wasCreated()) {
		Engine::log << Priority::error
		            << "Cannot render texture without engine renderer."
		            << std::endl;
		return nullptr;
	}

	SDL_Surface *surfaceRender = renderSurface(text, ptsize, renderColor_,
	                                           renderStyle_);

	result = SDL_CreateTextureFromSurface(Engine::get().getWindow().getRenderer(),
                                              surfaceRender);

	SDL_FreeSurface(surfaceRender);

	return result;
}
コード例 #5
0
ファイル: viewport.cpp プロジェクト: UndeadKernel/Teaplot
void Viewport::paintEvent(QPaintEvent *p_event)
{
    //qDebug() << "Viewport paint event!";

    renderSurface();
}