src/share/classes/sun/java2d/pipe/BufferedContext.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 35,45 ****
import sun.java2d.SunGraphics2D;
import sun.java2d.loops.XORComposite;
import static sun.java2d.pipe.BufferedOpCodes.*;
import static sun.java2d.pipe.BufferedRenderPipe.BYTES_PER_SPAN;
! import javax.tools.annotation.GenerateNativeHeader;
/**
* Base context class for managing state in a single-threaded rendering
* environment. Each state-setting operation (e.g. SET_COLOR) is added to
* the provided RenderQueue, which will be processed at a later time by a
--- 35,45 ----
import sun.java2d.SunGraphics2D;
import sun.java2d.loops.XORComposite;
import static sun.java2d.pipe.BufferedOpCodes.*;
import static sun.java2d.pipe.BufferedRenderPipe.BYTES_PER_SPAN;
! import java.lang.annotation.Native;
/**
* Base context class for managing state in a single-threaded rendering
* environment. Each state-setting operation (e.g. SET_COLOR) is added to
* the provided RenderQueue, which will be processed at a later time by a
*** 47,58 ****
* calling the validate() method (or any other method in this class). See
* the RenderQueue class comments for a sample usage scenario.
*
* @see RenderQueue
*/
- /* No native methods here, but the constants are needed in the supporting JNI code */
- @GenerateNativeHeader
public abstract class BufferedContext {
/*
* The following flags help the internals of validate() determine
* the appropriate (meaning correct, or optimal) code path when
--- 47,56 ----
*** 61,83 ****
*/
/**
* Indicates that no flags are needed; take all default code paths.
*/
! public static final int NO_CONTEXT_FLAGS = (0 << 0);
/**
* Indicates that the source surface (or color value, if it is a simple
* rendering operation) is opaque (has an alpha value of 1.0). If this
* flag is present, it allows us to disable blending in certain
* situations in order to improve performance.
*/
! public static final int SRC_IS_OPAQUE = (1 << 0);
/**
* Indicates that the operation uses an alpha mask, which may determine
* the code path that is used when setting up the current paint state.
*/
! public static final int USE_MASK = (1 << 1);
protected RenderQueue rq;
protected RenderBuffer buf;
/**
--- 59,81 ----
*/
/**
* Indicates that no flags are needed; take all default code paths.
*/
! @Native public static final int NO_CONTEXT_FLAGS = (0 << 0);
/**
* Indicates that the source surface (or color value, if it is a simple
* rendering operation) is opaque (has an alpha value of 1.0). If this
* flag is present, it allows us to disable blending in certain
* situations in order to improve performance.
*/
! @Native public static final int SRC_IS_OPAQUE = (1 << 0);
/**
* Indicates that the operation uses an alpha mask, which may determine
* the code path that is used when setting up the current paint state.
*/
! @Native public static final int USE_MASK = (1 << 1);
protected RenderQueue rq;
protected RenderBuffer buf;
/**