Print this page
Added gradle and cmake project


  47 
  48     @Override
  49     protected void validateContext(SunGraphics2D sg2d, Composite comp) {
  50         // assert rq.lock.isHeldByCurrentThread();
  51         OGLSurfaceData oglDst = (OGLSurfaceData)sg2d.surfaceData;
  52         OGLContext.validateContext(oglDst, oglDst,
  53                                    sg2d.getCompClip(), comp,
  54                                    null, sg2d.paint, sg2d,
  55                                    OGLContext.NO_CONTEXT_FLAGS);
  56     }
  57 
  58     OGLTextRenderer traceWrap() {
  59         return new Tracer(this);
  60     }
  61 
  62     private static class Tracer extends OGLTextRenderer {
  63         Tracer(OGLTextRenderer ogltr) {
  64             super(ogltr.rq);
  65         }
  66         protected void drawGlyphList(SunGraphics2D sg2d, GlyphList gl) {
  67             GraphicsPrimitive.tracePrimitive("OGLDrawGlyphs");




  68             super.drawGlyphList(sg2d, gl);

  69         }
  70     }
  71 }


  47 
  48     @Override
  49     protected void validateContext(SunGraphics2D sg2d, Composite comp) {
  50         // assert rq.lock.isHeldByCurrentThread();
  51         OGLSurfaceData oglDst = (OGLSurfaceData)sg2d.surfaceData;
  52         OGLContext.validateContext(oglDst, oglDst,
  53                                    sg2d.getCompClip(), comp,
  54                                    null, sg2d.paint, sg2d,
  55                                    OGLContext.NO_CONTEXT_FLAGS);
  56     }
  57 
  58     OGLTextRenderer traceWrap() {
  59         return new Tracer(this);
  60     }
  61 
  62     private static class Tracer extends OGLTextRenderer {
  63         Tracer(OGLTextRenderer ogltr) {
  64             super(ogltr.rq);
  65         }
  66         protected void drawGlyphList(SunGraphics2D sg2d, GlyphList gl) {
  67             final String prim = "OGLDrawGlyphs" + (gl.isRGBOrder() ? "LCD" : "Gray");
  68             if ((GraphicsPrimitive.traceflags & GraphicsPrimitive.TRACEPTIME) == 0) {
  69                 GraphicsPrimitive.tracePrimitive(prim);
  70             }
  71             long time = System.nanoTime();
  72             super.drawGlyphList(sg2d, gl);
  73             GraphicsPrimitive.tracePrimitiveTime(prim, System.nanoTime() - time);
  74         }
  75     }
  76 }