This fixes every case where virtual and SK_OVERRIDE were on the same line,
which should be the bulk of cases. We'll have to manually clean up the rest
over time unless I level up in regexes.
for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end
BUG=skia:
Review URL: https://codereview.chromium.org/806653007
Refactor SkGLContext to be actually extendable. Before, non-trivial subclass
would need to destroy the GL connection upon running the destructor. However,
the base class would run GL commands in its own destructor (with destroyed GL
connection)
Refactor so that SkGLContext subclass object creation is completely done by
the factory function. If the factory function returns a non-NULL ptr, it means the context
is usable.
The destruction is done with the destructor instead of virtual function called
upon destruction. Make the destructors not to call virtual functions, for
clarity.
Remove custom 1x1 FBO setup code from the base class. It appears not to be used
anymore.
BUG=skia:2992
Review URL: https://codereview.chromium.org/640283004
Make the Sk GL context class, SkGLNativeContext, an abstract base class. Before,
it depended on ifdefs to implement the platform dependent polymorphism. Move
the logic to subclasses of the various platform implementations.
This a step to enable Skia embedders to compile dm and bench_pictures. The
concrete goal is to support running these test apps with Chromium command buffer.
With this change, Chromium can implement its own version of SkGLNativeContext
that uses command buffer, and host the implementation in its own repository.
Implements the above by renaming the SkGLContextHelper to SkGLContext and
removing the unneeded SkGLNativeContext. Also removes
SkGLNativeContext::AutoRestoreContext functionality, it appeared to be unused:
no use in Skia code, and no tests.
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8
Review URL: https://codereview.chromium.org/630843002
Reason for revert:
nanobech failing on Android
Original issue's description:
> Make the Sk GL context class an abstract base class
>
> Make the Sk GL context class, SkGLNativeContext, an abstract base class. Before,
> it depended on ifdefs to implement the platform dependent polymorphism. Move
> the logic to subclasses of the various platform implementations.
>
> This a step to enable Skia embedders to compile dm and bench_pictures. The
> concrete goal is to support running these test apps with Chromium command buffer.
>
> With this change, Chromium can implement its own version of SkGLNativeContext
> that uses command buffer, and host the implementation in its own repository.
>
> Implements the above by renaming the SkGLContextHelper to SkGLContext and
> removing the unneeded SkGLNativeContext. Also removes
> SkGLNativeContext::AutoRestoreContext functionality, it appeared to be unused:
> no use in Skia code, and no tests.
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8TBR=kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992
Review URL: https://codereview.chromium.org/639793002
Make the Sk GL context class, SkGLNativeContext, an abstract base class. Before,
it depended on ifdefs to implement the platform dependent polymorphism. Move
the logic to subclasses of the various platform implementations.
This a step to enable Skia embedders to compile dm and bench_pictures. The
concrete goal is to support running these test apps with Chromium command buffer.
With this change, Chromium can implement its own version of SkGLNativeContext
that uses command buffer, and host the implementation in its own repository.
Implements the above by renaming the SkGLContextHelper to SkGLContext and
removing the unneeded SkGLNativeContext. Also removes
SkGLNativeContext::AutoRestoreContext functionality, it appeared to be unused:
no use in Skia code, and no tests.
BUG=skia:2992
Review URL: https://codereview.chromium.org/630843002
This reverts commit 5672da0fa5.
This appears to be blocking the Skia roll by causing failures in the blink layout tests on the canvas-lost-gpu-context.html test.
The bisect for this can be seen at:
https://codereview.chromium.org/449473002/
Original issue's description:
> Adds a GrGLPathRendering class that wraps the NV_path_rendering
> extension and manages its various API versions. It also provides
> backup implementations when certain NVpr methods from later API
> versions are not present on the current system.
>
> Committed: https://skia.googlesource.com/skia/+/5672da0fa54f31c9727568e9dd5fe82c6e1585bc
Adds the glStencilThenCover* nvpr methods to GrGLInterface and starts
using them. When drawing multible paths, this will make it so we only
have to send the index/transform data once. It will also allow the
driver to save time internally.
The glStencilThenCover* methods are a newer addition, so they aren't
available on every driver. In the event that they are not present, we
emulate them using the existing glStencil*/glCover* methods.
BUG=skia:
R=markkilgard@gmail.com, bsalomon@google.com
Author: cdalton@nvidia.com
Review URL: https://codereview.chromium.org/423173004
Fix debug crash when GrResourceCache is destroyed after GrContext is abandoned while GrTextures are in the exlusive list.
Notify debug GL context that GL resources are expected to remain undeleted when context is destroyed after being abandoned.
Stop leaking program cache entries when context is abandoned.
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/422323002
Add OpenGL ES extension functions needed to support NV_path_rendering in OpenGL
ES.
The added glProgramPathFragmentInputGenNV call is defined in NV_path_rendering
revision 30, similar to following:
Append to the end of the "Shader Inputs" subsection of Section 3.12.2
"Shader Execution":
The command
void ProgramPathFragmentInputGenNV(uint program,
int location,
enum genMode,
int components,
const float *coeffs);
controls how a user-defined (non-built-in) fragment input of a
GLSL program object is computed for fragment shading operations that
occur as a result of CoverFillPathNV or CoverStrokePathNV.
/program/ names a GLSL program object. If /program/ has not been
successfully linked, the error INVALID_OPERATION is generated.
The given fragment input generation state is loaded into the fragment
input variable location identified by /location/. This location
is a value returned either by GetProgramResourceLocation with a
/programInterface/ of FRAGMENT_INPUT_NV and a given fragment shader
input variable name or by GetProgramResourceiv with FRAGMENT_INPUT_NV
for the /programInterface/ and LOCATION for the property for a given
fragment input resource index.
....
glProgramPathFragmentInputGenNV will be used instead of glPathTexGen,
because the latter depends on fixed function pipeline that is not
exposed in ES.
Also add glGetProgramResourceLocation from OpenGL 4.3 or
ARB_program_interface_query.
Also add FRAGMENT_INPUT define to be used with glGetProgramResourceLocation.
The added functions are not used yet, but they're needed when implementing
NV_path_rendering support for OpenGL ES. They can also be used on OpenGL.
Remove uncalled NV_path_rendering functions, so they do not cause confusion
or take space in the interface definition. The ones that are later used
can be re-added when needed.
Remove definitions NV_path_rendering that are for NV_path_rendering function
parameters that are not used. The ones that are later used
can be re-added when needed.
Committed: https://skia.googlesource.com/skia/+/4a995dfff2ecf91e8bf999d77e3218cec596232cR=bsalomon@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/345723002
Reason for revert:
Will have to unfortunately revert this CL in order to revert https://codereview.chromium.org/319043005/
Original issue's description:
> Add functions to support NV_path_rendering in OpenGL ES
>
> Add OpenGL ES extension functions needed to support NV_path_rendering in OpenGL
> ES.
>
> The added glProgramPathFragmentInputGenNV call is defined in NV_path_rendering
> revision 30, similar to following:
>
> Append to the end of the "Shader Inputs" subsection of Section 3.12.2
> "Shader Execution":
>
> The command
>
> void ProgramPathFragmentInputGenNV(uint program,
> int location,
> enum genMode,
> int components,
> const float *coeffs);
>
> controls how a user-defined (non-built-in) fragment input of a
> GLSL program object is computed for fragment shading operations that
> occur as a result of CoverFillPathNV or CoverStrokePathNV.
>
> /program/ names a GLSL program object. If /program/ has not been
> successfully linked, the error INVALID_OPERATION is generated.
>
> The given fragment input generation state is loaded into the fragment
> input variable location identified by /location/. This location
> is a value returned either by GetProgramResourceLocation with a
> /programInterface/ of FRAGMENT_INPUT_NV and a given fragment shader
> input variable name or by GetProgramResourceiv with FRAGMENT_INPUT_NV
> for the /programInterface/ and LOCATION for the property for a given
> fragment input resource index.
>
> ....
>
> glProgramPathFragmentInputGenNV will be used instead of glPathTexGen,
> because the latter depends on fixed function pipeline that is not
> exposed in ES.
>
> Also add glGetProgramResourceLocation from OpenGL 4.3 or
> ARB_program_interface_query.
>
> Also add FRAGMENT_INPUT define to be used with glGetProgramResourceLocation.
>
> The added functions are not used yet, but they're needed when implementing
> NV_path_rendering support for OpenGL ES. They can also be used on OpenGL.
>
> Remove uncalled NV_path_rendering functions, so they do not cause confusion
> or take space in the interface definition. The ones that are later used
> can be re-added when needed.
>
> Remove definitions NV_path_rendering that are for NV_path_rendering function
> parameters that are not used. The ones that are later used
> can be re-added when needed.
>
> Committed: https://skia.googlesource.com/skia/+/4a995dfff2ecf91e8bf999d77e3218cec596232cR=bsalomon@google.com, kkinnunen@nvidia.comTBR=bsalomon@google.com, kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true
Author: rmistry@google.com
Review URL: https://codereview.chromium.org/349983002
Add OpenGL ES extension functions needed to support NV_path_rendering in OpenGL
ES.
The added glProgramPathFragmentInputGenNV call is defined in NV_path_rendering
revision 30, similar to following:
Append to the end of the "Shader Inputs" subsection of Section 3.12.2
"Shader Execution":
The command
void ProgramPathFragmentInputGenNV(uint program,
int location,
enum genMode,
int components,
const float *coeffs);
controls how a user-defined (non-built-in) fragment input of a
GLSL program object is computed for fragment shading operations that
occur as a result of CoverFillPathNV or CoverStrokePathNV.
/program/ names a GLSL program object. If /program/ has not been
successfully linked, the error INVALID_OPERATION is generated.
The given fragment input generation state is loaded into the fragment
input variable location identified by /location/. This location
is a value returned either by GetProgramResourceLocation with a
/programInterface/ of FRAGMENT_INPUT_NV and a given fragment shader
input variable name or by GetProgramResourceiv with FRAGMENT_INPUT_NV
for the /programInterface/ and LOCATION for the property for a given
fragment input resource index.
....
glProgramPathFragmentInputGenNV will be used instead of glPathTexGen,
because the latter depends on fixed function pipeline that is not
exposed in ES.
Also add glGetProgramResourceLocation from OpenGL 4.3 or
ARB_program_interface_query.
Also add FRAGMENT_INPUT define to be used with glGetProgramResourceLocation.
The added functions are not used yet, but they're needed when implementing
NV_path_rendering support for OpenGL ES. They can also be used on OpenGL.
Remove uncalled NV_path_rendering functions, so they do not cause confusion
or take space in the interface definition. The ones that are later used
can be re-added when needed.
Remove definitions NV_path_rendering that are for NV_path_rendering function
parameters that are not used. The ones that are later used
can be re-added when needed.
R=bsalomon@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/345723002
Use fixed function pipeline only when drawing paths. Previously FF
vertex shader was used when drawing normal geometry if path rendering
was enabled.
This is required to make Chromium integration easier. This way
fixed function vertex shading, including vertexshader-less programs,
need not be implemented in the Chromium command buffer.
Removes FF TexGen functionality, as it is not used anymore. Likewise
removes the fixedFunctionSupport GL capability flag.
BUG=chromium:344330
R=bsalomon@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/212753002
git-svn-id: http://skia.googlecode.com/svn/trunk@14334 2bbb7eff-a529-9590-31e7-b0007b416f81
Pass vertices to the fixed-function shaders in vertex buffer object
stored at attribute 0. This is specified in OpenGL Compatibility
Profile Section 10.8.2 (Transferring Vertices With Vertex Attribute
Zero).
This makes future integration to Chromium command buffer better, since
the command buffer already has code for vertex buffer objects but not
vertex arrays.
Delete unused function pointers related to fixed-function codepaths.
R=bsalomon@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/130423013
git-svn-id: http://skia.googlecode.com/svn/trunk@13557 2bbb7eff-a529-9590-31e7-b0007b416f81