Пример #1
0
        public override void postRender()
        {
            if (DurationStatistics.collectStatistics && isLogInfoEnabled)
            {
                pixelStatistics.end();
                const int pixelsGrouping = 1000;
                int       n = pixel.NumberPixels / pixelsGrouping;
                if (!pixelsStatistics.ContainsKey(n))
                {
                    pixelsStatistics[n] = new DurationStatistics(string.Format("Pixels count={0:D}", n * pixelsGrouping));
                }
                if (isLogTraceEnabled)
                {
                    log.trace(string.Format("Pixels statistics count={0:D}, real count={1:D}", n * pixelsGrouping, pixel.NumberPixels));
                }
                pixelsStatistics[n].add(pixelStatistics);
            }

            if (rendererWriter != null)
            {
                rendererWriter.flush();
            }

            base.postRender();

            statisticsFilters(pixel.NumberPixels);
        }
Пример #2
0
 public override void setCompressedTexImage(int level, int internalFormat, int width, int height, int compressedSize, Buffer buffer)
 {
     if (useTextureCache)
     {
         cachedTextureStatistics.start();
         // TODO Cache all the texture levels
         if (level == 0)
         {
             int                    bufferWidth            = context.texture_buffer_width[level];
             IMemoryReader          imageReader            = ImageReader.getImageReader(context.texture_base_pointer[level], width, height, bufferWidth, internalFormat, false, 0, 0, 0, 0, 0, 0, null, null);
             CachedTexture          cachedTexture          = CachedTexture.getCachedTexture(System.Math.Min(width, bufferWidth), height, internalFormat, imageReader);
             CachedTextureResampled cachedTextureResampled = new CachedTextureResampled(cachedTexture);
             cachedTextures[bindTexture_Renamed] = cachedTextureResampled;
         }
         cachedTextureStatistics.end();
     }
 }
Пример #3
0
        public static bool coreInterpretWithStatistics()
        {
            coreInterpret.start();
            bool result = coreInterpret();

            coreInterpret.end();

            return(result);
        }
Пример #4
0
        public override void drawArrays(int primitive, int first, int count)
        {
            drawArraysStatistics.start();
            switch (primitive)
            {
            case pspsharp.graphics.RE.IRenderingEngine_Fields.GU_SPRITES:
                drawArraysSprites(first, count);
                break;

            case pspsharp.graphics.RE.IRenderingEngine_Fields.GU_TRIANGLE_STRIP:
                drawArraysTriangleStrips(first, count);
                break;

            case pspsharp.graphics.RE.IRenderingEngine_Fields.GU_TRIANGLES:
                drawArraysTriangles(first, count);
                break;

            case pspsharp.graphics.RE.IRenderingEngine_Fields.GU_TRIANGLE_FAN:
                drawArraysTriangleFan(first, count);
                break;
            }
            drawArraysStatistics.end();
        }