Project: skia Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 2992 Support running dm and nanobench with Chromium command buffer
Starred by 4 users Project Member Reported by kkinnu...@nvidia.com, Oct 6 2014 Back to list
Status: Accepted
Owner:
Cc:
Area: GPU
Priority: Medium
Type: Defect

Blocked on:
issue 4518



Sign in to add a comment
It'd be great to be able to run Skia test apps with Chromium command buffer as the gl implementation.

The usecases I have are:
1) Implement Chromium command buffer features
** Use the unit tests of Skia to ensure nothing breaks

2) Measure Chromium command buffer overhead and profile command buffer implementation
** Use the benchmarks of Skia to see what is the "minimum" current overhead that the command buffer induces

3) Implement command buffer -only features in Skia
** Test the Skia implementation rigorously instead of just running test-cases with Chromium




 
Project Member Comment 1 by kkinnu...@nvidia.com, Oct 8 2014
Summary: Support running dm and bench_pictures with Chromium command buffer (was: Support running dm and render_pictures with Chromium command buffer)
Project Member Comment 2 by bugdroid1@chromium.org, Oct 8 2014
The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8

commit a90ed4e83897b45d6331ee4c54e1edd4054de9a8
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Wed Oct 08 04:14:24 2014 -0700

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

Review URL: https://codereview.chromium.org/630843002

[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/bench/nanobench.cpp
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/gyp/gpu.gypi
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/gyp/public_headers.gypi
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/include/gpu/GrContextFactory.h
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/include/gpu/gl/SkANGLEGLContext.h
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/include/gpu/gl/SkDebugGLContext.h
[rename] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/include/gpu/gl/SkGLContext.h
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/include/gpu/gl/SkMesaGLContext.h
[delete] https://skia.googlesource.com/skia.git/+/5a161ea78ebb668849c62baffae0bfffae98c332/include/gpu/gl/SkNativeGLContext.h
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/include/gpu/gl/SkNullGLContext.h
[rename] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/src/gpu/gl/SkGLContext.cpp
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/src/gpu/gl/angle/SkANGLEGLContext.cpp
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp
[rename] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp
[rename] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/src/gpu/gl/glx/SkCreatePlatformGLContext_glx.cpp
[add] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/src/gpu/gl/iOS/SkCreatePlatformGLContext_iOS.mm
[delete] https://skia.googlesource.com/skia.git/+/5a161ea78ebb668849c62baffae0bfffae98c332/src/gpu/gl/iOS/SkNativeGLContext_iOS.mm
[rename] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/src/gpu/gl/mesa/SkMesaGLContext.cpp
[add] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/src/gpu/gl/nacl/SkCreatePlatformGLContext_nacl.cpp
[delete] https://skia.googlesource.com/skia.git/+/5a161ea78ebb668849c62baffae0bfffae98c332/src/gpu/gl/nacl/SkNativeGLContext_nacl.cpp
[rename] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/tests/GLInterfaceValidationTest.cpp
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/tests/Test.cpp
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/tools/PictureRenderer.cpp
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/tools/PictureRenderer.h
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/tools/timer/GpuTimer.cpp
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/tools/timer/GpuTimer.h
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/tools/timer/Timer.cpp
[modify] https://skia.googlesource.com/skia.git/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8/tools/timer/Timer.h

Project Member Comment 3 by bugdroid1@chromium.org, Oct 8 2014
The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac

commit 10805961ce424868e8315e00f6dbeeaa62d466ac
Author: bsalomon <bsalomon@google.com>
Date: Wed Oct 08 04:45:09 2014 -0700

Revert of Make the Sk GL context class an abstract base class (patchset #4 id:60001 of 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/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8

TBR=kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/639793002

[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/bench/nanobench.cpp
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/gyp/gpu.gypi
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/gyp/public_headers.gypi
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/include/gpu/GrContextFactory.h
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/include/gpu/gl/SkANGLEGLContext.h
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/include/gpu/gl/SkDebugGLContext.h
[rename] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/include/gpu/gl/SkGLContextHelper.h
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/include/gpu/gl/SkMesaGLContext.h
[add] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/include/gpu/gl/SkNativeGLContext.h
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/include/gpu/gl/SkNullGLContext.h
[rename] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/src/gpu/gl/SkGLContextHelper.cpp
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/src/gpu/gl/angle/SkANGLEGLContext.cpp
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp
[rename] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/src/gpu/gl/egl/SkNativeGLContext_egl.cpp
[rename] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/src/gpu/gl/glx/SkNativeGLContext_glx.cpp
[delete] https://skia.googlesource.com/skia.git/+/a5ee45ce9daba663c28ba5f6634af93702aecd96/src/gpu/gl/iOS/SkCreatePlatformGLContext_iOS.mm
[add] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/src/gpu/gl/iOS/SkNativeGLContext_iOS.mm
[rename] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/src/gpu/gl/mac/SkNativeGLContext_mac.cpp
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/src/gpu/gl/mesa/SkMesaGLContext.cpp
[delete] https://skia.googlesource.com/skia.git/+/a5ee45ce9daba663c28ba5f6634af93702aecd96/src/gpu/gl/nacl/SkCreatePlatformGLContext_nacl.cpp
[add] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/src/gpu/gl/nacl/SkNativeGLContext_nacl.cpp
[rename] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/src/gpu/gl/win/SkNativeGLContext_win.cpp
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/tests/GLInterfaceValidationTest.cpp
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/tests/Test.cpp
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/tools/PictureRenderer.cpp
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/tools/PictureRenderer.h
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/tools/timer/GpuTimer.cpp
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/tools/timer/GpuTimer.h
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/tools/timer/Timer.cpp
[modify] https://skia.googlesource.com/skia.git/+/10805961ce424868e8315e00f6dbeeaa62d466ac/tools/timer/Timer.h

Project Member Comment 4 by bugdroid1@chromium.org, Oct 9 2014
The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c

commit 9e61bb7815b133bc40ea7b00fccc853f4b728e3c
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Thu Oct 09 05:24:15 2014 -0700

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/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8

Review URL: https://codereview.chromium.org/630843002

[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/bench/nanobench.cpp
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/gyp/gpu.gypi
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/gyp/public_headers.gypi
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/include/gpu/GrContextFactory.h
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/include/gpu/gl/SkANGLEGLContext.h
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/include/gpu/gl/SkDebugGLContext.h
[rename] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/include/gpu/gl/SkGLContext.h
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/include/gpu/gl/SkMesaGLContext.h
[delete] https://skia.googlesource.com/skia.git/+/78c71272fb26852bf3d2ca31785e61d4a598af82/include/gpu/gl/SkNativeGLContext.h
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/include/gpu/gl/SkNullGLContext.h
[rename] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/src/gpu/gl/SkGLContext.cpp
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/src/gpu/gl/angle/SkANGLEGLContext.cpp
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp
[rename] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp
[rename] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/src/gpu/gl/glx/SkCreatePlatformGLContext_glx.cpp
[add] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/src/gpu/gl/iOS/SkCreatePlatformGLContext_iOS.mm
[delete] https://skia.googlesource.com/skia.git/+/78c71272fb26852bf3d2ca31785e61d4a598af82/src/gpu/gl/iOS/SkNativeGLContext_iOS.mm
[rename] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/src/gpu/gl/mesa/SkMesaGLContext.cpp
[add] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/src/gpu/gl/nacl/SkCreatePlatformGLContext_nacl.cpp
[delete] https://skia.googlesource.com/skia.git/+/78c71272fb26852bf3d2ca31785e61d4a598af82/src/gpu/gl/nacl/SkNativeGLContext_nacl.cpp
[rename] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/tests/GLInterfaceValidationTest.cpp
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/tests/Test.cpp
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/tools/PictureRenderer.cpp
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/tools/PictureRenderer.h
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/tools/timer/GpuTimer.cpp
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/tools/timer/GpuTimer.h
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/tools/timer/Timer.cpp
[modify] https://skia.googlesource.com/skia.git/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c/tools/timer/Timer.h

Project Member Comment 5 by hcm@google.com, Oct 14 2014
Labels: Area-GPU
Project Member Comment 6 by bugdroid1@chromium.org, Oct 16 2014
The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb

commit 30bc88ccd524c0372fd2f8f79190ea4b81685beb
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Wed Oct 15 23:03:54 2014 -0700

Refactor SkGLContext to be actually extendable

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

[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/include/gpu/GrContextFactory.h
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/include/gpu/gl/SkANGLEGLContext.h
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/include/gpu/gl/SkDebugGLContext.h
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/include/gpu/gl/SkGLContext.h
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/include/gpu/gl/SkMesaGLContext.h
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/include/gpu/gl/SkNullGLContext.h
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/src/gpu/gl/SkGLContext.cpp
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/src/gpu/gl/SkNullGLContext.cpp
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/src/gpu/gl/angle/SkANGLEGLContext.cpp
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/src/gpu/gl/debug/SkDebugGLContext.cpp
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/src/gpu/gl/glx/SkCreatePlatformGLContext_glx.cpp
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/src/gpu/gl/iOS/SkCreatePlatformGLContext_iOS.mm
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/src/gpu/gl/mesa/SkMesaGLContext.cpp
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/src/gpu/gl/nacl/SkCreatePlatformGLContext_nacl.cpp
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/tests/GLInterfaceValidationTest.cpp
[modify] https://skia.googlesource.com/skia.git/+/30bc88ccd524c0372fd2f8f79190ea4b81685beb/tools/timer/GpuTimer.cpp

Project Member Comment 7 by bugdroid1@chromium.org, Oct 20 2014
The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/93b255b19e01a0f10ac3b9e20f2d8fedcb5e57ca

commit 93b255b19e01a0f10ac3b9e20f2d8fedcb5e57ca
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Sun Oct 19 22:07:23 2014 -0700

Make SkImageDecoder_libpng be compilable with Chromium libpng

Chromium has libpng with pngusr.h that disables certain functionality with
defines. Use those defines when compiling SkImageDecoder_libpng.cpp.

This makes it possible to use Skia PNG decoder and encoder when compiling dm
with Chromium. Skia PNG decoder and encoder of course is not compiled to the
skia library, but to dm with Chromium.

BUG=skia:2992

Review URL: https://codereview.chromium.org/645883004

[modify] https://skia.googlesource.com/skia.git/+/93b255b19e01a0f10ac3b9e20f2d8fedcb5e57ca/src/images/SkImageDecoder_libpng.cpp

Project Member Comment 9 by kkinnu...@nvidia.com, Nov 11 2014
Summary: Support running dm and nanobench with Chromium command buffer (was: Support running dm and bench_pictures with Chromium command buffer)
Project Member Comment 10 by kkinnu...@nvidia.com, Nov 12 2014
Cc: scro...@google.com bsalo...@google.com
Leon, would there be something else for me to do in order to get the patches moving in one direction or another?

Remove image decoder and encoder autoregistration -- https://codereview.chromium.org/670453002/

Move code to dump GrSurface as a png to helper files -- https://codereview.chromium.org/665913002/

Remove a SkImageDecoder reference from SkPicture.h -- https://codereview.chromium.org/647973006/

Move SkImage::encode to SkImageEncoder --
https://codereview.chromium.org/656503003/

Make Matrix44Test work with SK_MSCALAR_IS_FLOAT --
https://codereview.chromium.org/663443003/

Adding Brian too, since he has expressed the interest in the end goal (not necessarily to my implementation of getting there.)
Project Member Comment 11 by bugdroid1@chromium.org, Nov 13 2014
The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/c092d3bdab5f723576cc0346cea3ee282a9cb444

commit c092d3bdab5f723576cc0346cea3ee282a9cb444
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Thu Nov 13 05:00:57 2014 -0800

Make nanobench and dm be usable from Chromium build

Move the app logic for each app as follows:

<app>.cpp -- the file which contains main(). Embedders that compile
their own apps, such as ios shell, upcoming Chromium dm etc, do not use this.

<app>_main.cpp -- the main logic of the Skia test application. This will be
used by Skia -compiled apps as well as embedder -compiled apps.

<app>_main.h -- the API for the main logic. This will be
used by Skia -compiled apps as well as embedder -compiled apps.

This way (the upcoming) Chromium dm can setup its Chromium-specific setup
in custom main(), and then call dm_main(), without the need of any
SK_BUILD_FOR_XXXX defines controlling whether the tool defines main or not.

BUG=skia:2992

Review URL: https://codereview.chromium.org/657373002

[modify] https://skia.googlesource.com/skia.git/+/c092d3bdab5f723576cc0346cea3ee282a9cb444/bench/nanobench.cpp
[add] https://skia.googlesource.com/skia.git/+/c092d3bdab5f723576cc0346cea3ee282a9cb444/bench/nanobench.h
[add] https://skia.googlesource.com/skia.git/+/c092d3bdab5f723576cc0346cea3ee282a9cb444/bench/nanobench_main.cpp
[modify] https://skia.googlesource.com/skia.git/+/c092d3bdab5f723576cc0346cea3ee282a9cb444/dm/DM.cpp
[add] https://skia.googlesource.com/skia.git/+/c092d3bdab5f723576cc0346cea3ee282a9cb444/dm/dm.h
[add] https://skia.googlesource.com/skia.git/+/c092d3bdab5f723576cc0346cea3ee282a9cb444/dm/dm_main.cpp
[modify] https://skia.googlesource.com/skia.git/+/c092d3bdab5f723576cc0346cea3ee282a9cb444/gyp/bench.gyp
[modify] https://skia.googlesource.com/skia.git/+/c092d3bdab5f723576cc0346cea3ee282a9cb444/gyp/dm.gyp
[modify] https://skia.googlesource.com/skia.git/+/c092d3bdab5f723576cc0346cea3ee282a9cb444/gyp/most.gyp
[modify] https://skia.googlesource.com/skia.git/+/c092d3bdab5f723576cc0346cea3ee282a9cb444/tools/iOSShell.cpp

Project Member Comment 12 by bugdroid1@chromium.org, Nov 13 2014
The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/0935aed2787eb79629125bdfef9aba2a6a283ef7

commit 0935aed2787eb79629125bdfef9aba2a6a283ef7
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Thu Nov 13 06:00:44 2014 -0800

Fix build for iOS after "Make nanobench and dm be usable from Chromium build"

Fix build for iOS after "Make nanobench and dm be usable from Chromium
build"

BUG=skia:2992

Review URL: https://codereview.chromium.org/716413003

[modify] https://skia.googlesource.com/skia.git/+/0935aed2787eb79629125bdfef9aba2a6a283ef7/gyp/iOSShell.gyp

Project Member Comment 13 by bugdroid1@chromium.org, Nov 13 2014
The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/1c6e7571d40e31247609fd7469f8422018304310

commit 1c6e7571d40e31247609fd7469f8422018304310
Author: jcgregorio <jcgregorio@google.com>
Date: Thu Nov 13 07:58:01 2014 -0800

Revert of Fix build for iOS after "Make nanobench and dm be usable from Chromium build" (patchset #1 id:1 of https://codereview.chromium.org/716413003/)

Reason for revert:
Causes breakages on Mac.

Original issue's description:
> Fix build for iOS after "Make nanobench and dm be usable from Chromium build"
>
> Fix build for iOS after "Make nanobench and dm be usable from Chromium
> build"
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/0935aed2787eb79629125bdfef9aba2a6a283ef7

TBR=robertphillips@google.com,kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/724813002

[modify] https://skia.googlesource.com/skia.git/+/1c6e7571d40e31247609fd7469f8422018304310/gyp/iOSShell.gyp

Project Member Comment 14 by bugdroid1@chromium.org, Nov 13 2014
The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/3b27adef0a52f6d321fdee7412ef69e7a7284bcc

commit 3b27adef0a52f6d321fdee7412ef69e7a7284bcc
Author: jcgregorio <jcgregorio@google.com>
Date: Thu Nov 13 08:06:40 2014 -0800

Revert of Make nanobench and dm be usable from Chromium build (patchset #5 id:80001 of https://codereview.chromium.org/657373002/)

Reason for revert:
Causing breakages on Mac build.

Original issue's description:
> Make nanobench and dm be usable from Chromium build
>
> Move the app logic for each app as follows:
>
> <app>.cpp -- the file which contains main(). Embedders that compile
> their own apps, such as ios shell, upcoming Chromium dm etc, do not use this.
>
> <app>_main.cpp -- the main logic of the Skia test application. This will be
> used by Skia -compiled apps as well as embedder -compiled apps.
>
> <app>_main.h -- the API for the main logic. This will be
> used by Skia -compiled apps as well as embedder -compiled apps.
>
> This way (the upcoming) Chromium dm can setup its Chromium-specific setup
> in custom main(), and then call dm_main(), without the need of any
> SK_BUILD_FOR_XXXX defines controlling whether the tool defines main or not.
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/c092d3bdab5f723576cc0346cea3ee282a9cb444

TBR=mtklein@chromium.org,mtklein@google.com,borenet@google.com,kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/724073002

[modify] https://skia.googlesource.com/skia.git/+/3b27adef0a52f6d321fdee7412ef69e7a7284bcc/bench/nanobench.cpp
[delete] https://skia.googlesource.com/skia.git/+/1c6e7571d40e31247609fd7469f8422018304310/bench/nanobench.h
[delete] https://skia.googlesource.com/skia.git/+/1c6e7571d40e31247609fd7469f8422018304310/bench/nanobench_main.cpp
[modify] https://skia.googlesource.com/skia.git/+/3b27adef0a52f6d321fdee7412ef69e7a7284bcc/dm/DM.cpp
[delete] https://skia.googlesource.com/skia.git/+/1c6e7571d40e31247609fd7469f8422018304310/dm/dm.h
[delete] https://skia.googlesource.com/skia.git/+/1c6e7571d40e31247609fd7469f8422018304310/dm/dm_main.cpp
[modify] https://skia.googlesource.com/skia.git/+/3b27adef0a52f6d321fdee7412ef69e7a7284bcc/gyp/bench.gyp
[modify] https://skia.googlesource.com/skia.git/+/3b27adef0a52f6d321fdee7412ef69e7a7284bcc/gyp/dm.gyp
[modify] https://skia.googlesource.com/skia.git/+/3b27adef0a52f6d321fdee7412ef69e7a7284bcc/gyp/most.gyp
[modify] https://skia.googlesource.com/skia.git/+/3b27adef0a52f6d321fdee7412ef69e7a7284bcc/tools/iOSShell.cpp

Project Member Comment 15 by bsalo...@google.com, Oct 1 2015
Owner: hendr...@chromium.org
Hendrik has been landing CLs to make this happen. Should we dupe this into a chromium bug?
Project Member Comment 16 by kkinnu...@nvidia.com, Oct 12 2015
I'm fine with anything. I couldn't find any bug number in Hendrik's comments.
Project Member Comment 17 by hendr...@chromium.org, Oct 12 2015
Yeah, I never made an issue for it, I can use this one.
Project Member Comment 18 by bugdroid1@chromium.org, Oct 13 2015
The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/0adfffba1bee55eee9e31e809cd0089840722b26

commit 0adfffba1bee55eee9e31e809cd0089840722b26
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Tue Oct 13 19:58:37 2015

Fix dm with Chromium command buffer driver

Fix a crash in dm when run with Chromium command buffer driver.

Also removes glCopyTextureCHROMIUM, it does not seem to be used.
This is removed on the grounds that it would need similar change,
if it was used. The variable fCopyTextureCHROMIUM does not seem to
be populated in the Chromium side, either.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1389213004

[modify] http://crrev.com/0adfffba1bee55eee9e31e809cd0089840722b26/include/gpu/gl/GrGLFunctions.h
[modify] http://crrev.com/0adfffba1bee55eee9e31e809cd0089840722b26/include/gpu/gl/GrGLInterface.h
[modify] http://crrev.com/0adfffba1bee55eee9e31e809cd0089840722b26/src/gpu/gl/GrGLAssembleInterface.cpp

Project Member Comment 19 by bugdroid1@chromium.org, Oct 26 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/213e490b733180b643600217e0fdc39e596b109a

commit 213e490b733180b643600217e0fdc39e596b109a
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Mon Oct 26 16:26:01 2015

Support multiple contexts in command_buffer_gles2

Fix problems with multiple contexts when using command_buffer_gles2
library.

Rendering to two different command_buffer_gles2-provided contexts would
not work, as the last created native context would remain current.

Also fixes a problem with Skia, where Skia would create and use a GLX
context directly, as well as using command_buffer_gles2 context.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1416043005

Cr-Commit-Position: refs/heads/master@{#356058}

[modify] http://crrev.com/213e490b733180b643600217e0fdc39e596b109a/gpu/gles2_conform_support/egl/display.cc

Project Member Comment 20 by kkinnu...@nvidia.com, Oct 27 2015
Blockedon: skia:4518
Project Member Comment 21 by bugdroid1@chromium.org, Oct 27 2015
The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/855dc9395f3b13e1087aae3351a2a368fb89c11e

commit 855dc9395f3b13e1087aae3351a2a368fb89c11e
Author: hendrikw <hendrikw@chromium.org>
Date: Tue Oct 27 17:04:34 2015

skia: Fix command buffer support on the mac

The extension on the mac is .dylib, updated the name.

EGL.h isn't available on mac (unless we include skia_angle.h).
I've got a somewhat bad hack of defining the types that I need
to get this running.

GetProcedureAddress was somehow successfully grabbing gl
functions from another lib.  Removed this call, I copied it
from ANGLE impl, but it isn't required.

lib load path works differently, fixed in GYP

BUG=skia:2992

Review URL: https://codereview.chromium.org/1403153002

[modify] http://crrev.com/855dc9395f3b13e1087aae3351a2a368fb89c11e/gyp/common_conditions.gypi
[modify] http://crrev.com/855dc9395f3b13e1087aae3351a2a368fb89c11e/src/gpu/gl/command_buffer/SkCommandBufferGLContext.cpp

Project Member Comment 22 by bugdroid1@chromium.org, Oct 29 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/60da545176aed90d91874a456da2bac8b822c67d

commit 60da545176aed90d91874a456da2bac8b822c67d
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Thu Oct 29 09:27:46 2015

gpu: Make glTexSubImage2D work with GL_SRGB_ALPHA on OpenGL

Make glTexSubImage2D work when client passes GL_SRGB_ALPHA as the
format when running on OpenGL.

Considering GL_SRGB_ALPHA texture:
In OpenGL ES, Tex*Image2D format must be GL_SRGB_ALPHA (same as texture
internal format).
In OpenGL, format must not be GL_SRGB_ALPHA.

The format was handled correctly for glTexImage2D, but not for
glTexSubImage2D. The actual fix is to apply
TextureManager::AdjustTexFormat to glTexSubImage2D format.

Moves the glTexSubImage2D code from decoder to texture manager, and
tries to follow the structure of glTexImage2D. This is due to hoping to
reduce the amount of similar inconsistency bugs. The glTexSubImage3D,
CopySubTexture* and compressed call variants are still potential
sources of inconsistencies. The code duplication between glTexImage2D
and glTexSubImage2D is not addressed, either.

Changes the texture size of
Service/GLES2DecoderTest.TexSubImage2DBadArgs.  The check for behavior
"!pixels -> kOutOfBounds" was moved before argument validation. In the
test, there is a subtest that uses invalid type, GL_UNSIGNED_INT. This
causes the texture data to be bigger than SHM buffer, the unexpected
kOutOfBounds would be returned instead of normal GL error for invalid
type.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1426903002

Cr-Commit-Position: refs/heads/master@{#356787}

[modify] http://crrev.com/60da545176aed90d91874a456da2bac8b822c67d/gpu/BUILD.gn
[modify] http://crrev.com/60da545176aed90d91874a456da2bac8b822c67d/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] http://crrev.com/60da545176aed90d91874a456da2bac8b822c67d/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
[modify] http://crrev.com/60da545176aed90d91874a456da2bac8b822c67d/gpu/command_buffer/service/texture_manager.cc
[modify] http://crrev.com/60da545176aed90d91874a456da2bac8b822c67d/gpu/command_buffer/service/texture_manager.h
[add] http://crrev.com/60da545176aed90d91874a456da2bac8b822c67d/gpu/command_buffer/tests/gl_ext_srgb_unittest.cc
[modify] http://crrev.com/60da545176aed90d91874a456da2bac8b822c67d/gpu/gpu.gyp

Project Member Comment 23 by bugdroid1@chromium.org, Oct 29 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/48b95d23777b0b02d25c37803bcace4cf044cf80

commit 48b95d23777b0b02d25c37803bcace4cf044cf80
Author: wychen <wychen@chromium.org>
Date: Thu Oct 29 17:42:47 2015

Revert of gpu: Make glTexSubImage2D work with GL_SRGB_ALPHA on OpenGL (patchset #2 id:20001 of https://codereview.chromium.org/1426903002/ )

Reason for revert:
Caused Android test failure (GLEXTSRGBTest.TexImageSRGBALPHAFormat).

Original issue's description:
> gpu: Make glTexSubImage2D work with GL_SRGB_ALPHA on OpenGL
>
> Make glTexSubImage2D work when client passes GL_SRGB_ALPHA as the
> format when running on OpenGL.
>
> Considering GL_SRGB_ALPHA texture:
> In OpenGL ES, Tex*Image2D format must be GL_SRGB_ALPHA (same as texture
> internal format).
> In OpenGL, format must not be GL_SRGB_ALPHA.
>
> The format was handled correctly for glTexImage2D, but not for
> glTexSubImage2D. The actual fix is to apply
> TextureManager::AdjustTexFormat to glTexSubImage2D format.
>
> Moves the glTexSubImage2D code from decoder to texture manager, and
> tries to follow the structure of glTexImage2D. This is due to hoping to
> reduce the amount of similar inconsistency bugs. The glTexSubImage3D,
> CopySubTexture* and compressed call variants are still potential
> sources of inconsistencies. The code duplication between glTexImage2D
> and glTexSubImage2D is not addressed, either.
>
> Changes the texture size of
> Service/GLES2DecoderTest.TexSubImage2DBadArgs.  The check for behavior
> "!pixels -> kOutOfBounds" was moved before argument validation. In the
> test, there is a subtest that uses invalid type, GL_UNSIGNED_INT. This
> causes the texture data to be bigger than SHM buffer, the unexpected
> kOutOfBounds would be returned instead of normal GL error for invalid
> type.
>
> BUG=skia:2992
>
> Committed: https://crrev.com/60da545176aed90d91874a456da2bac8b822c67d
> Cr-Commit-Position: refs/heads/master@{#356787}

TBR=bajones@chromium.org,piman@chromium.org,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1418113009

Cr-Commit-Position: refs/heads/master@{#356882}

[modify] http://crrev.com/48b95d23777b0b02d25c37803bcace4cf044cf80/gpu/BUILD.gn
[modify] http://crrev.com/48b95d23777b0b02d25c37803bcace4cf044cf80/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] http://crrev.com/48b95d23777b0b02d25c37803bcace4cf044cf80/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
[modify] http://crrev.com/48b95d23777b0b02d25c37803bcace4cf044cf80/gpu/command_buffer/service/texture_manager.cc
[modify] http://crrev.com/48b95d23777b0b02d25c37803bcace4cf044cf80/gpu/command_buffer/service/texture_manager.h
[delete] http://crrev.com/077c40c130a199b47b7d75f716519a716aab980f/gpu/command_buffer/tests/gl_ext_srgb_unittest.cc
[modify] http://crrev.com/48b95d23777b0b02d25c37803bcace4cf044cf80/gpu/gpu.gyp

Project Member Comment 24 by bugdroid1@chromium.org, Nov 9 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0c2dee787ace66b1f2d68cca0e19c2d3c82858f4

commit 0c2dee787ace66b1f2d68cca0e19c2d3c82858f4
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Mon Nov 09 11:13:58 2015

gpu: Make glTexSubImage2D work with GL_SRGB_ALPHA on OpenGL

Make glTexSubImage2D work when client passes GL_SRGB_ALPHA as the
format when running on OpenGL.

Considering GL_SRGB_ALPHA texture:
In OpenGL ES 2.0, Tex*Image2D format must be GL_SRGB_ALPHA (same as texture
internal format).
In OpenGL and OpenGL ES 3.0, format must not be GL_SRGB_ALPHA.

The format was handled correctly for glTexImage2D, but not for
glTexSubImage2D. The actual fix is to apply
TextureManager::AdjustTexFormat to glTexSubImage2D format.

Moves the glTexSubImage2D code from decoder to texture manager, and
tries to follow the structure of glTexImage2D. This is due to hoping to
reduce the amount of similar inconsistency bugs. The glTexSubImage3D,
CopySubTexture* and compressed call variants are still potential
sources of inconsistencies. The code duplication between glTexImage2D
and glTexSubImage2D is not addressed, either.

Changes the texture size of
Service/GLES2DecoderTest.TexSubImage2DBadArgs.  The check for behavior
"!pixels -> kOutOfBounds" was moved before argument validation. In the
test, there is a subtest that uses invalid type, GL_UNSIGNED_INT. This
causes the texture data to be bigger than SHM buffer, the unexpected
kOutOfBounds would be returned instead of normal GL error for invalid
type.

BUG=skia:2992

Committed: https://crrev.com/60da545176aed90d91874a456da2bac8b822c67d
Cr-Commit-Position: refs/heads/master@{#356787}

Review URL: https://codereview.chromium.org/1426903002

Cr-Commit-Position: refs/heads/master@{#358578}

[modify] http://crrev.com/0c2dee787ace66b1f2d68cca0e19c2d3c82858f4/gpu/BUILD.gn
[modify] http://crrev.com/0c2dee787ace66b1f2d68cca0e19c2d3c82858f4/gpu/command_buffer/service/feature_info.cc
[modify] http://crrev.com/0c2dee787ace66b1f2d68cca0e19c2d3c82858f4/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] http://crrev.com/0c2dee787ace66b1f2d68cca0e19c2d3c82858f4/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
[modify] http://crrev.com/0c2dee787ace66b1f2d68cca0e19c2d3c82858f4/gpu/command_buffer/service/texture_manager.cc
[modify] http://crrev.com/0c2dee787ace66b1f2d68cca0e19c2d3c82858f4/gpu/command_buffer/service/texture_manager.h
[add] http://crrev.com/0c2dee787ace66b1f2d68cca0e19c2d3c82858f4/gpu/command_buffer/tests/gl_ext_srgb_unittest.cc
[modify] http://crrev.com/0c2dee787ace66b1f2d68cca0e19c2d3c82858f4/gpu/config/gpu_driver_bug_list_json.cc
[modify] http://crrev.com/0c2dee787ace66b1f2d68cca0e19c2d3c82858f4/gpu/config/gpu_driver_bug_workaround_type.h
[modify] http://crrev.com/0c2dee787ace66b1f2d68cca0e19c2d3c82858f4/gpu/gpu.gyp

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/4e18413b78236391f507875ab5d60aa14cb3c1a5

commit 4e18413b78236391f507875ab5d60aa14cb3c1a5
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Wed Nov 18 06:53:28 2015

Move SkImage tests from SurfaceTest to ImageTest

The general SkImage features seem to be tested in
ImageTest instead of SurfaceTest.

Helps in reviewing further reformatting of SurfaceTest.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1452123002

[modify] http://crrev.com/4e18413b78236391f507875ab5d60aa14cb3c1a5/tests/ImageTest.cpp
[modify] http://crrev.com/4e18413b78236391f507875ab5d60aa14cb3c1a5/tests/SurfaceTest.cpp

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/179a8f5f7feab052e24596d0d04ab5cf2ccab5e0

commit 179a8f5f7feab052e24596d0d04ab5cf2ccab5e0
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Fri Nov 20 21:32:24 2015

Generate list of GPU contexts outside SurfaceTest tests

Add support for feeding the tests with contexts directly to the unit
test framework.

This fixes the problem where tests are more complex than needed just in
order to run the test code with multiple backends.

Also makes it possible to change the logic how contexts are
created. Instead of direct numbering, the different testable contexts
may be generated from filtered cross-product of context options. For
example: currently NVPR is a type of context. However, it could be also
an on/off feature of any context. In order to test this kind of context,
the enumeration can not be just of context type. It's simpler
to move the enumeration out of the tests.

A test targeting both normal and GPU backends would look like:

static void test_obj_behavior(skiatest::Reporter* reporter,
    SkObj* obj, [other params] ) {
    ... test with obj and param ..
}
DEF_TEST(ObjBehavior, reporter) {
    for (auto& object : generate_object) {
        for (auto& other_param : generate_other_variant) {
	   test_obj_behavior(reporter, object, other_param);
	}
    }
}
#if SK_SUPPORT_GPU
DEF_GPUTEST_FOR_ALL_CONTEXTS(ObjBehavior_Gpu, reporter, context) {
    for (auto& object : generate_gpu_object) {
        for (auto& other_param : generate_other_variant) {
	   test_obj_behavior(reporter, object, other_param);
	}
    }
}
#endif

Uses the feature in SurfaceTests as an example.

Moves SkSurface -related tests from ImageTest to SurfaceTest.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1446453003

[modify] http://crrev.com/179a8f5f7feab052e24596d0d04ab5cf2ccab5e0/dm/DM.cpp
[modify] http://crrev.com/179a8f5f7feab052e24596d0d04ab5cf2ccab5e0/src/gpu/GrContextFactory.cpp
[modify] http://crrev.com/179a8f5f7feab052e24596d0d04ab5cf2ccab5e0/src/gpu/GrContextFactory.h
[modify] http://crrev.com/179a8f5f7feab052e24596d0d04ab5cf2ccab5e0/tests/ImageTest.cpp
[modify] http://crrev.com/179a8f5f7feab052e24596d0d04ab5cf2ccab5e0/tests/SurfaceTest.cpp
[modify] http://crrev.com/179a8f5f7feab052e24596d0d04ab5cf2ccab5e0/tests/Test.h
[add] http://crrev.com/179a8f5f7feab052e24596d0d04ab5cf2ccab5e0/tests/TestTest.cpp

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/7b94c1479fc4ab3b7526808ac83c73f48d3cd721

commit 7b94c1479fc4ab3b7526808ac83c73f48d3cd721
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Tue Nov 24 15:39:40 2015

Generate list of GPU contexts outside ImageTest tests

Use DEF_GPUTEST_FOR_*_CONTEXT macros to obtain the
test GPU context.

Makes changing the context -related classes easier,
since not all tests need to be changed.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1454663002

[modify] http://crrev.com/7b94c1479fc4ab3b7526808ac83c73f48d3cd721/tests/ImageTest.cpp

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/1530283c483cb88aa725bce50a6d193dd00ee570

commit 1530283c483cb88aa725bce50a6d193dd00ee570
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Tue Dec 01 12:35:26 2015

Generate list of GPU contexts outside tests

Use DEF_GPUTEST_FOR_*_CONTEXT macros to obtain the
test GPU context.

Makes changing the context -related classes easier,
since not all tests need to be changed.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1448873002

[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/BlurTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/ClipBoundsTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/FloatingPointTextureTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/GpuColorFilterTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/GpuDrawPathTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/GpuLayerCacheTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/GrDrawTargetTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/GrPorterDuffTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/GrSurfaceTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/GrTextureMipMapInvalidationTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/ImageFilterTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/ImageIsOpaqueTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/ImageNewShaderTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/PictureTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/PremulAlphaRoundTripTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/ReadPixelsTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/ReadWriteAlphaTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/RecordReplaceDrawTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/ResourceCacheTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/SRGBReadWritePixelsTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/TessellatingPathRendererTests.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/TextBlobCacheTest.cpp
[modify] http://crrev.com/1530283c483cb88aa725bce50a6d193dd00ee570/tests/WritePixelsTest.cpp

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/eeebdb538d476c1bfc8b63a946094ca1b505ecd1

commit eeebdb538d476c1bfc8b63a946094ca1b505ecd1
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Tue Dec 01 13:10:48 2015

Make NVPR a GL context option instead of a GL context

Make NVPR a GL context option instead of a GL context.
This may enable NVPR to be run with command buffer
interface.

No functionality change in DM or nanobench. NVPR can
only be run with normal GL APIs.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1448883002

[modify] http://crrev.com/eeebdb538d476c1bfc8b63a946094ca1b505ecd1/bench/nanobench.cpp
[modify] http://crrev.com/eeebdb538d476c1bfc8b63a946094ca1b505ecd1/bench/nanobench.h
[modify] http://crrev.com/eeebdb538d476c1bfc8b63a946094ca1b505ecd1/dm/DM.cpp
[modify] http://crrev.com/eeebdb538d476c1bfc8b63a946094ca1b505ecd1/dm/DMGpuSupport.h
[modify] http://crrev.com/eeebdb538d476c1bfc8b63a946094ca1b505ecd1/dm/DMSrcSink.cpp
[modify] http://crrev.com/eeebdb538d476c1bfc8b63a946094ca1b505ecd1/dm/DMSrcSink.h
[modify] http://crrev.com/eeebdb538d476c1bfc8b63a946094ca1b505ecd1/src/gpu/GrContextFactory.cpp
[modify] http://crrev.com/eeebdb538d476c1bfc8b63a946094ca1b505ecd1/src/gpu/GrContextFactory.h
[modify] http://crrev.com/eeebdb538d476c1bfc8b63a946094ca1b505ecd1/tests/GLInterfaceValidationTest.cpp
[modify] http://crrev.com/eeebdb538d476c1bfc8b63a946094ca1b505ecd1/tests/GrContextFactoryTest.cpp
[add] http://crrev.com/eeebdb538d476c1bfc8b63a946094ca1b505ecd1/tools/PictureRenderer.h

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/cb6cb21cd9d27054810d2c80ef534dcddd615d4b

commit cb6cb21cd9d27054810d2c80ef534dcddd615d4b
Author: scroggo <scroggo@google.com>
Date: Tue Dec 01 15:53:37 2015

Fix Android framework build

eeebdb538d476c1bfc8b63a946094ca1b505ecd1 did not update a Config that
only builds if SK_BUILD_FOR_ANDROID_FRAMEWORK. This appears to be the
necessary parameter that is missing.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1491563003

[modify] http://crrev.com/cb6cb21cd9d27054810d2c80ef534dcddd615d4b/bench/nanobench.cpp

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/a0a024e323ebf73ea4559d4b29f937902703828b

commit a0a024e323ebf73ea4559d4b29f937902703828b
Author: bsalomon <bsalomon@google.com>
Date: Tue Dec 01 15:58:44 2015

Revert of Make NVPR a GL context option instead of a GL context (patchset #2 id:20001 of https://codereview.chromium.org/1448883002/ )

Reason for revert:
BUG= skia:4609 

skbug.com/4609

Seems like GrContextFactory needs to fail when the NVPR option is requested but the driver version isn't sufficiently high.

Original issue's description:
> Make NVPR a GL context option instead of a GL context
>
> Make NVPR a GL context option instead of a GL context.
> This may enable NVPR to be run with command buffer
> interface.
>
> No functionality change in DM or nanobench. NVPR can
> only be run with normal GL APIs.
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/eeebdb538d476c1bfc8b63a946094ca1b505ecd1

TBR=mtklein@google.com,jvanverth@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1486153002

[modify] http://crrev.com/a0a024e323ebf73ea4559d4b29f937902703828b/bench/nanobench.cpp
[modify] http://crrev.com/a0a024e323ebf73ea4559d4b29f937902703828b/bench/nanobench.h
[modify] http://crrev.com/a0a024e323ebf73ea4559d4b29f937902703828b/dm/DM.cpp
[modify] http://crrev.com/a0a024e323ebf73ea4559d4b29f937902703828b/dm/DMGpuSupport.h
[modify] http://crrev.com/a0a024e323ebf73ea4559d4b29f937902703828b/dm/DMSrcSink.cpp
[modify] http://crrev.com/a0a024e323ebf73ea4559d4b29f937902703828b/dm/DMSrcSink.h
[modify] http://crrev.com/a0a024e323ebf73ea4559d4b29f937902703828b/src/gpu/GrContextFactory.cpp
[modify] http://crrev.com/a0a024e323ebf73ea4559d4b29f937902703828b/src/gpu/GrContextFactory.h
[modify] http://crrev.com/a0a024e323ebf73ea4559d4b29f937902703828b/tests/GLInterfaceValidationTest.cpp
[modify] http://crrev.com/a0a024e323ebf73ea4559d4b29f937902703828b/tests/GrContextFactoryTest.cpp
[delete] http://crrev.com/cb6cb21cd9d27054810d2c80ef534dcddd615d4b/tools/PictureRenderer.h

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/9323dc6a72de301f23e1187adc2365395b4b23d8

commit 9323dc6a72de301f23e1187adc2365395b4b23d8
Author: scroggo <scroggo@google.com>
Date: Tue Dec 01 16:08:18 2015

Revert of Fix Android framework build (patchset #1 id:1 of https://codereview.chromium.org/1491563003/ )

Reason for revert:
eeebdb538d476c1bfc8b63a946094ca1b505ecd1 was reverted, so this one needs to be reverted, too

Original issue's description:
> Fix Android framework build
>
> eeebdb538d476c1bfc8b63a946094ca1b505ecd1 did not update a Config that
> only builds if SK_BUILD_FOR_ANDROID_FRAMEWORK. This appears to be the
> necessary parameter that is missing.
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/cb6cb21cd9d27054810d2c80ef534dcddd615d4b

TBR=bsalomon@google.com,tomhudson@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1487033002

[modify] http://crrev.com/9323dc6a72de301f23e1187adc2365395b4b23d8/bench/nanobench.cpp

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/9d66696f6b1651b52adad1b0202aca013ef7da58

commit 9d66696f6b1651b52adad1b0202aca013ef7da58
Author: borenet <borenet@google.com>
Date: Wed Dec 09 15:03:51 2015

Revert of Make NVPR a GL context option instead of a GL context (patchset #9 id:160001 of https://codereview.chromium.org/1448883002/ )

Reason for revert:
"Could not create surface" on Linux GTX660 bots

Original issue's description:
> Make NVPR a GL context option instead of a GL context
>
> Make NVPR a GL context option instead of a GL context.
> This may enable NVPR to be run with command buffer
> interface.
>
> No functionality change in DM or nanobench. NVPR can
> only be run with normal GL APIs.
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/eeebdb538d476c1bfc8b63a946094ca1b505ecd1
>
> Committed: https://skia.googlesource.com/skia/+/64492c43c3faee7ab0f69b1c84e0267616f85e52

TBR=mtklein@google.com,bsalomon@google.com,jvanverth@google.com,scroggo@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1513703002

[modify] http://crrev.com/9d66696f6b1651b52adad1b0202aca013ef7da58/bench/nanobench.cpp
[modify] http://crrev.com/9d66696f6b1651b52adad1b0202aca013ef7da58/bench/nanobench.h
[modify] http://crrev.com/9d66696f6b1651b52adad1b0202aca013ef7da58/dm/DM.cpp
[modify] http://crrev.com/9d66696f6b1651b52adad1b0202aca013ef7da58/dm/DMGpuSupport.h
[modify] http://crrev.com/9d66696f6b1651b52adad1b0202aca013ef7da58/dm/DMSrcSink.cpp
[modify] http://crrev.com/9d66696f6b1651b52adad1b0202aca013ef7da58/dm/DMSrcSink.h
[modify] http://crrev.com/9d66696f6b1651b52adad1b0202aca013ef7da58/src/gpu/GrContextFactory.cpp
[modify] http://crrev.com/9d66696f6b1651b52adad1b0202aca013ef7da58/src/gpu/GrContextFactory.h
[modify] http://crrev.com/9d66696f6b1651b52adad1b0202aca013ef7da58/tests/GrContextFactoryTest.cpp

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/2ca29c0b919765f01ee07625250c0b58f30b05b5

commit 2ca29c0b919765f01ee07625250c0b58f30b05b5
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Thu Dec 10 06:58:34 2015

Populate NVPR functions when run with command buffer

Populate the NV_path_rendering functions provided by
CHROMIUM_path_rendering when the tools are being run with
command buffer API.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1510163003

[modify] http://crrev.com/2ca29c0b919765f01ee07625250c0b58f30b05b5/src/gpu/gl/GrGLAssembleInterface.cpp
[modify] http://crrev.com/2ca29c0b919765f01ee07625250c0b58f30b05b5/src/gpu/gl/GrGLInterface.cpp

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/5219fd9ff7aa6ebf64c905ad40f5e0027a39962b

commit 5219fd9ff7aa6ebf64c905ad40f5e0027a39962b
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Thu Dec 10 14:28:13 2015

Make NVPR a GL context option instead of a GL context

Make NVPR a GL context option instead of a GL context.
This may enable NVPR to be run with command buffer
interface.

No functionality change in DM or nanobench. NVPR can
only be run with normal GL APIs.

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/eeebdb538d476c1bfc8b63a946094ca1b505ecd1

Committed: https://skia.googlesource.com/skia/+/64492c43c3faee7ab0f69b1c84e0267616f85e52

Review URL: https://codereview.chromium.org/1448883002

[modify] http://crrev.com/5219fd9ff7aa6ebf64c905ad40f5e0027a39962b/bench/nanobench.cpp
[modify] http://crrev.com/5219fd9ff7aa6ebf64c905ad40f5e0027a39962b/bench/nanobench.h
[modify] http://crrev.com/5219fd9ff7aa6ebf64c905ad40f5e0027a39962b/dm/DM.cpp
[modify] http://crrev.com/5219fd9ff7aa6ebf64c905ad40f5e0027a39962b/dm/DMGpuSupport.h
[modify] http://crrev.com/5219fd9ff7aa6ebf64c905ad40f5e0027a39962b/dm/DMSrcSink.cpp
[modify] http://crrev.com/5219fd9ff7aa6ebf64c905ad40f5e0027a39962b/dm/DMSrcSink.h
[modify] http://crrev.com/5219fd9ff7aa6ebf64c905ad40f5e0027a39962b/src/gpu/GrContextFactory.cpp
[modify] http://crrev.com/5219fd9ff7aa6ebf64c905ad40f5e0027a39962b/src/gpu/GrContextFactory.h
[modify] http://crrev.com/5219fd9ff7aa6ebf64c905ad40f5e0027a39962b/tests/GrContextFactoryTest.cpp

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/e13ca329fca4c28cf4e078561f591ab27b743d23

commit e13ca329fca4c28cf4e078561f591ab27b743d23
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Mon Dec 14 12:49:17 2015

Add config options to run different GPU APIs to dm and nanobench

Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
    --config:	type: string	default: 565 8888 gpu nonrendering
        Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
        nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
        xps or use extended form 'backend(option=value,...)'.

        Extended form: 'backend(option=value,...)'

        Possible backends and options:

        gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
        	api	type: string	default: native.
        	    Select graphics API to use with gpu backend.
        	    Options:
        		native			Use platform default OpenGL or OpenGL ES backend.
        		gl    			Use OpenGL.
        		gles  			Use OpenGL ES.
        		debug 			Use debug OpenGL.
        		null  			Use null OpenGL.
        	dit	type: bool	default: false.
        	    Use device independent text.
        	nvpr	type: bool	default: false.
        	    Use NV_path_rendering OpenGL and OpenGL ES extension.
        	samples	type: int	default: 0.
        	    Use multisampling with N samples.

        Predefined configs:

        	gpu      	= gpu()
        	msaa4    	= gpu(samples=4)
        	msaa16   	= gpu(samples=16)
        	nvprmsaa4	= gpu(nvpr=true,samples=4)
        	nvprmsaa16	= gpu(nvpr=true,samples=16)
        	gpudft    	= gpu(dit=true)
        	gpudebug  	= gpu(api=debug)
        	gpunull   	= gpu(api=null)
        	debug     	= gpu(api=debug)
        	nullgpu   	= gpu(api=null)

BUG=skia:2992

Review URL: https://codereview.chromium.org/1490113005

[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/bench/nanobench.cpp
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/dm/DM.cpp
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/dm/DMGpuSupport.h
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/dm/DMSrcSink.cpp
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/dm/DMSrcSink.h
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/gyp/flags.gyp
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/include/core/SkString.h
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/include/gpu/gl/SkNullGLContext.h
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/include/gpu/gl/angle/SkANGLEGLContext.h
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/include/gpu/gl/command_buffer/SkCommandBufferGLContext.h
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/src/core/SkString.cpp
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/src/gpu/GrContextFactory.cpp
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/src/gpu/GrContextFactory.h
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/src/gpu/gl/SkNullGLContext.cpp
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/src/gpu/gl/angle/SkANGLEGLContext.cpp
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/src/gpu/gl/debug/SkDebugGLContext.h
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/src/gpu/gl/mesa/SkMesaGLContext.h
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/tests/GLProgramsTest.cpp
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/tests/GrContextFactoryTest.cpp
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/tests/StringTest.cpp
[add] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/tests/TestConfigParsing.cpp
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/tools/flags/SkCommandLineFlags.cpp
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/tools/flags/SkCommandLineFlags.h
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/tools/flags/SkCommonFlags.cpp
[modify] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/tools/flags/SkCommonFlags.h
[add] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/tools/flags/SkCommonFlagsConfig.cpp
[add] http://crrev.com/e13ca329fca4c28cf4e078561f591ab27b743d23/tools/flags/SkCommonFlagsConfig.h

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee

commit 4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee
Author: reed <reed@google.com>
Date: Mon Dec 14 13:58:25 2015

Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #12 id:220001 of https://codereview.chromium.org/1490113005/ )

Reason for revert:
speculative revert to see if it unblocks the DEPS roll

https://codereview.chromium.org/1529443002

Original issue's description:
> Add config options to run different GPU APIs to dm and nanobench
>
> Add extended config specification form that can be used to run different
> gpu backend with different APIs.
>
> The configs can be specified with the form:
> gpu(api=string,dit=bool,nvpr=bool,samples=int)
>
> This replaces and removes the --gpuAPI flag.
>
> All existing configs should still work.
>
> Adds following documentation:
>
> out/Debug/dm --help config
>
> Flags:
>     --config:	type: string	default: 565 8888 gpu nonrendering
>         Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
>         nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
>         xps or use extended form 'backend(option=value,...)'.
>
>         Extended form: 'backend(option=value,...)'
>
>         Possible backends and options:
>
>         gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
>         	api	type: string	default: native.
>         	    Select graphics API to use with gpu backend.
>         	    Options:
>         		native			Use platform default OpenGL or OpenGL ES backend.
>         		gl    			Use OpenGL.
>         		gles  			Use OpenGL ES.
>         		debug 			Use debug OpenGL.
>         		null  			Use null OpenGL.
>         	dit	type: bool	default: false.
>         	    Use device independent text.
>         	nvpr	type: bool	default: false.
>         	    Use NV_path_rendering OpenGL and OpenGL ES extension.
>         	samples	type: int	default: 0.
>         	    Use multisampling with N samples.
>
>         Predefined configs:
>
>         	gpu      	= gpu()
>         	msaa4    	= gpu(samples=4)
>         	msaa16   	= gpu(samples=16)
>         	nvprmsaa4	= gpu(nvpr=true,samples=4)
>         	nvprmsaa16	= gpu(nvpr=true,samples=16)
>         	gpudft    	= gpu(dit=true)
>         	gpudebug  	= gpu(api=debug)
>         	gpunull   	= gpu(api=null)
>         	debug     	= gpu(api=debug)
>         	nullgpu   	= gpu(api=null)
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23

TBR=bsalomon@google.com,scroggo@google.com,joshualitt@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1528473002

[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/bench/nanobench.cpp
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/dm/DM.cpp
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/dm/DMGpuSupport.h
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/dm/DMSrcSink.cpp
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/dm/DMSrcSink.h
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/gyp/flags.gyp
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/include/core/SkString.h
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/include/gpu/gl/SkNullGLContext.h
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/include/gpu/gl/angle/SkANGLEGLContext.h
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/include/gpu/gl/command_buffer/SkCommandBufferGLContext.h
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/src/core/SkString.cpp
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/src/gpu/GrContextFactory.cpp
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/src/gpu/GrContextFactory.h
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/src/gpu/gl/SkNullGLContext.cpp
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/src/gpu/gl/angle/SkANGLEGLContext.cpp
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/src/gpu/gl/debug/SkDebugGLContext.h
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/src/gpu/gl/mesa/SkMesaGLContext.h
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/tests/GLProgramsTest.cpp
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/tests/GrContextFactoryTest.cpp
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/tests/StringTest.cpp
[delete] http://crrev.com/0b29b728cae6c3f3738b4cda0b786960d05dda2b/tests/TestConfigParsing.cpp
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/tools/flags/SkCommandLineFlags.cpp
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/tools/flags/SkCommandLineFlags.h
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/tools/flags/SkCommonFlags.cpp
[modify] http://crrev.com/4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee/tools/flags/SkCommonFlags.h
[delete] http://crrev.com/0b29b728cae6c3f3738b4cda0b786960d05dda2b/tools/flags/SkCommonFlagsConfig.cpp
[delete] http://crrev.com/0b29b728cae6c3f3738b4cda0b786960d05dda2b/tools/flags/SkCommonFlagsConfig.h

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/c8b4336444e7b90382e04e33665fb3b8490b825b

commit c8b4336444e7b90382e04e33665fb3b8490b825b
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Fri Dec 18 11:27:32 2015

Add config options to run different GPU APIs to dm and nanobench

Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
    --config:	type: string	default: 565 8888 gpu nonrendering
        Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
        nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
        xps or use extended form 'backend(option=value,...)'.

        Extended form: 'backend(option=value,...)'

        Possible backends and options:

        gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
        	api	type: string	default: native.
        	    Select graphics API to use with gpu backend.
        	    Options:
        		native			Use platform default OpenGL or OpenGL ES backend.
        		gl    			Use OpenGL.
        		gles  			Use OpenGL ES.
        		debug 			Use debug OpenGL.
        		null  			Use null OpenGL.
        	dit	type: bool	default: false.
        	    Use device independent text.
        	nvpr	type: bool	default: false.
        	    Use NV_path_rendering OpenGL and OpenGL ES extension.
        	samples	type: int	default: 0.
        	    Use multisampling with N samples.

        Predefined configs:

        	gpu      	= gpu()
        	msaa4    	= gpu(samples=4)
        	msaa16   	= gpu(samples=16)
        	nvprmsaa4	= gpu(nvpr=true,samples=4)
        	nvprmsaa16	= gpu(nvpr=true,samples=16)
        	gpudft    	= gpu(dit=true)
        	gpudebug  	= gpu(api=debug)
        	gpunull   	= gpu(api=null)
        	debug     	= gpu(api=debug)
        	nullgpu   	= gpu(api=null)

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005

Review URL: https://codereview.chromium.org/1490113005

[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/bench/nanobench.cpp
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/dm/DM.cpp
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/dm/DMGpuSupport.h
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/dm/DMSrcSink.cpp
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/dm/DMSrcSink.h
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/gyp/flags.gyp
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/include/core/SkString.h
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/include/gpu/gl/SkNullGLContext.h
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/include/gpu/gl/angle/SkANGLEGLContext.h
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/include/gpu/gl/command_buffer/SkCommandBufferGLContext.h
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/src/core/SkString.cpp
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/src/gpu/GrContextFactory.cpp
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/src/gpu/GrContextFactory.h
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/src/gpu/gl/SkNullGLContext.cpp
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/src/gpu/gl/angle/SkANGLEGLContext.cpp
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/src/gpu/gl/debug/SkDebugGLContext.h
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/src/gpu/gl/mesa/SkMesaGLContext.h
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/tests/GLProgramsTest.cpp
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/tests/GrContextFactoryTest.cpp
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/tests/StringTest.cpp
[add] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/tests/TestConfigParsing.cpp
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/tools/flags/SkCommandLineFlags.cpp
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/tools/flags/SkCommandLineFlags.h
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/tools/flags/SkCommonFlags.cpp
[modify] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/tools/flags/SkCommonFlags.h
[add] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/tools/flags/SkCommonFlagsConfig.cpp
[add] http://crrev.com/c8b4336444e7b90382e04e33665fb3b8490b825b/tools/flags/SkCommonFlagsConfig.h

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2

commit 4dabf83cbe3096eaa7b80c101ba0e9c277b560d2
Author: joshualitt <joshualitt@google.com>
Date: Fri Dec 18 14:02:18 2015

Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #18 id:340001 of https://codereview.chromium.org/1490113005/ )

Reason for revert:
This CL changed 1200 images on gold, when I wouldn't expect any diffs from the description.

Original issue's description:
> Add config options to run different GPU APIs to dm and nanobench
>
> Add extended config specification form that can be used to run different
> gpu backend with different APIs.
>
> The configs can be specified with the form:
> gpu(api=string,dit=bool,nvpr=bool,samples=int)
>
> This replaces and removes the --gpuAPI flag.
>
> All existing configs should still work.
>
> Adds following documentation:
>
> out/Debug/dm --help config
>
> Flags:
>     --config:	type: string	default: 565 8888 gpu nonrendering
>         Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
>         nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
>         xps or use extended form 'backend(option=value,...)'.
>
>         Extended form: 'backend(option=value,...)'
>
>         Possible backends and options:
>
>         gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
>         	api	type: string	default: native.
>         	    Select graphics API to use with gpu backend.
>         	    Options:
>         		native			Use platform default OpenGL or OpenGL ES backend.
>         		gl    			Use OpenGL.
>         		gles  			Use OpenGL ES.
>         		debug 			Use debug OpenGL.
>         		null  			Use null OpenGL.
>         	dit	type: bool	default: false.
>         	    Use device independent text.
>         	nvpr	type: bool	default: false.
>         	    Use NV_path_rendering OpenGL and OpenGL ES extension.
>         	samples	type: int	default: 0.
>         	    Use multisampling with N samples.
>
>         Predefined configs:
>
>         	gpu      	= gpu()
>         	msaa4    	= gpu(samples=4)
>         	msaa16   	= gpu(samples=16)
>         	nvprmsaa4	= gpu(nvpr=true,samples=4)
>         	nvprmsaa16	= gpu(nvpr=true,samples=16)
>         	gpudft    	= gpu(dit=true)
>         	gpudebug  	= gpu(api=debug)
>         	gpunull   	= gpu(api=null)
>         	debug     	= gpu(api=debug)
>         	nullgpu   	= gpu(api=null)
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
>
> Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b

TBR=mtklein@google.com,bsalomon@google.com,scroggo@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1536963002

[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/bench/nanobench.cpp
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/dm/DM.cpp
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/dm/DMGpuSupport.h
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/dm/DMSrcSink.cpp
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/dm/DMSrcSink.h
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/gyp/flags.gyp
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/include/core/SkString.h
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/include/gpu/gl/SkNullGLContext.h
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/include/gpu/gl/angle/SkANGLEGLContext.h
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/include/gpu/gl/command_buffer/SkCommandBufferGLContext.h
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/src/core/SkString.cpp
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/src/gpu/GrContextFactory.cpp
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/src/gpu/GrContextFactory.h
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/src/gpu/gl/SkNullGLContext.cpp
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/src/gpu/gl/angle/SkANGLEGLContext.cpp
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/src/gpu/gl/debug/SkDebugGLContext.h
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/src/gpu/gl/mesa/SkMesaGLContext.h
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/tests/GLProgramsTest.cpp
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/tests/GrContextFactoryTest.cpp
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/tests/StringTest.cpp
[delete] http://crrev.com/e848ff59651e4441b2c303ef14db10fd678cee9f/tests/TestConfigParsing.cpp
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/tools/flags/SkCommandLineFlags.cpp
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/tools/flags/SkCommandLineFlags.h
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/tools/flags/SkCommonFlags.cpp
[modify] http://crrev.com/4dabf83cbe3096eaa7b80c101ba0e9c277b560d2/tools/flags/SkCommonFlags.h
[delete] http://crrev.com/e848ff59651e4441b2c303ef14db10fd678cee9f/tools/flags/SkCommonFlagsConfig.cpp
[delete] http://crrev.com/e848ff59651e4441b2c303ef14db10fd678cee9f/tools/flags/SkCommonFlagsConfig.h

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ec6196f4e367774ced1e6034562dc19663fece45

commit ec6196f4e367774ced1e6034562dc19663fece45
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Mon Dec 21 08:56:28 2015

Support arguments and driver bug workarounds in command_buffer_gles2

Add the possibility to pass Chromium command-line arguments to
the command_buffer_gles2 libary. The arguments can be passed
through CHROME_COMMAND_BUFFER_ARGS environment variable.

Initialize the driver bug workarounds. This makes the libarary
to behave more similarly to actual Chrome.

Makes it possible to test GL path rendering with Skia through
command buffer, since the --enable-gl-path-rendering command-line
flag can be set.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1509833002

Cr-Commit-Position: refs/heads/master@{#366349}

[modify] http://crrev.com/ec6196f4e367774ced1e6034562dc19663fece45/gpu/BUILD.gn
[modify] http://crrev.com/ec6196f4e367774ced1e6034562dc19663fece45/gpu/gles2_conform_support/egl/egl.cc

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd

commit 9ebc3f0ee6db215dde461dc4777d85988cf272dd
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Tue Dec 22 07:48:13 2015

Add config options to run different GPU APIs to dm and nanobench

Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
    --config:	type: string	default: 565 8888 gpu nonrendering
        Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
        nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
        xps or use extended form 'backend(option=value,...)'.

        Extended form: 'backend(option=value,...)'

        Possible backends and options:

        gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
        	api	type: string	default: native.
        	    Select graphics API to use with gpu backend.
        	    Options:
        		native			Use platform default OpenGL or OpenGL ES backend.
        		gl    			Use OpenGL.
        		gles  			Use OpenGL ES.
        		debug 			Use debug OpenGL.
        		null  			Use null OpenGL.
        	dit	type: bool	default: false.
        	    Use device independent text.
        	nvpr	type: bool	default: false.
        	    Use NV_path_rendering OpenGL and OpenGL ES extension.
        	samples	type: int	default: 0.
        	    Use multisampling with N samples.

        Predefined configs:

        	gpu      	= gpu()
        	msaa4    	= gpu(samples=4)
        	msaa16   	= gpu(samples=16)
        	nvprmsaa4	= gpu(nvpr=true,samples=4)
        	nvprmsaa16	= gpu(nvpr=true,samples=16)
        	gpudft    	= gpu(dit=true)
        	gpudebug  	= gpu(api=debug)
        	gpunull   	= gpu(api=null)
        	debug     	= gpu(api=debug)
        	nullgpu   	= gpu(api=null)

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005

Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b

Review URL: https://codereview.chromium.org/1490113005

[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/bench/nanobench.cpp
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/dm/DM.cpp
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/dm/DMGpuSupport.h
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/dm/DMSrcSink.cpp
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/dm/DMSrcSink.h
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/gyp/flags.gyp
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/include/core/SkString.h
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/include/gpu/gl/SkNullGLContext.h
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/include/gpu/gl/angle/SkANGLEGLContext.h
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/include/gpu/gl/command_buffer/SkCommandBufferGLContext.h
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/src/core/SkString.cpp
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/src/gpu/GrContextFactory.cpp
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/src/gpu/GrContextFactory.h
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/src/gpu/gl/SkNullGLContext.cpp
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/src/gpu/gl/angle/SkANGLEGLContext.cpp
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/src/gpu/gl/debug/SkDebugGLContext.h
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/src/gpu/gl/mesa/SkMesaGLContext.h
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/tests/GLProgramsTest.cpp
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/tests/GrContextFactoryTest.cpp
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/tests/StringTest.cpp
[add] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/tests/TestConfigParsing.cpp
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/tools/flags/SkCommandLineFlags.cpp
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/tools/flags/SkCommandLineFlags.h
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/tools/flags/SkCommonFlags.cpp
[modify] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/tools/flags/SkCommonFlags.h
[add] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/tools/flags/SkCommonFlagsConfig.cpp
[add] http://crrev.com/9ebc3f0ee6db215dde461dc4777d85988cf272dd/tools/flags/SkCommonFlagsConfig.h

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/0f515bd4284ee6e88cd04c62cb6c67e1f23db616

commit 0f515bd4284ee6e88cd04c62cb6c67e1f23db616
Author: rmistry <rmistry@google.com>
Date: Tue Dec 22 18:22:26 2015

Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #21 id:400001 of https://codereview.chromium.org/1490113005/ )

Reason for revert:
The Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug builder fails after this CL.

Links to specific builds:
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1689
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1690
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1691

Original issue's description:
> Add config options to run different GPU APIs to dm and nanobench
>
> Add extended config specification form that can be used to run different
> gpu backend with different APIs.
>
> The configs can be specified with the form:
> gpu(api=string,dit=bool,nvpr=bool,samples=int)
>
> This replaces and removes the --gpuAPI flag.
>
> All existing configs should still work.
>
> Adds following documentation:
>
> out/Debug/dm --help config
>
> Flags:
>     --config:	type: string	default: 565 8888 gpu nonrendering
>         Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
>         nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
>         xps or use extended form 'backend(option=value,...)'.
>
>         Extended form: 'backend(option=value,...)'
>
>         Possible backends and options:
>
>         gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
>         	api	type: string	default: native.
>         	    Select graphics API to use with gpu backend.
>         	    Options:
>         		native			Use platform default OpenGL or OpenGL ES backend.
>         		gl    			Use OpenGL.
>         		gles  			Use OpenGL ES.
>         		debug 			Use debug OpenGL.
>         		null  			Use null OpenGL.
>         	dit	type: bool	default: false.
>         	    Use device independent text.
>         	nvpr	type: bool	default: false.
>         	    Use NV_path_rendering OpenGL and OpenGL ES extension.
>         	samples	type: int	default: 0.
>         	    Use multisampling with N samples.
>
>         Predefined configs:
>
>         	gpu      	= gpu()
>         	msaa4    	= gpu(samples=4)
>         	msaa16   	= gpu(samples=16)
>         	nvprmsaa4	= gpu(nvpr=true,samples=4)
>         	nvprmsaa16	= gpu(nvpr=true,samples=16)
>         	gpudft    	= gpu(dit=true)
>         	gpudebug  	= gpu(api=debug)
>         	gpunull   	= gpu(api=null)
>         	debug     	= gpu(api=debug)
>         	nullgpu   	= gpu(api=null)
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
>
> Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
>
> Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd

TBR=mtklein@google.com,bsalomon@google.com,joshualitt@google.com,scroggo@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1548683002

[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/bench/nanobench.cpp
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/dm/DM.cpp
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/dm/DMGpuSupport.h
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/dm/DMSrcSink.cpp
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/dm/DMSrcSink.h
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/gyp/flags.gyp
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/include/core/SkString.h
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/include/gpu/gl/SkNullGLContext.h
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/include/gpu/gl/angle/SkANGLEGLContext.h
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/include/gpu/gl/command_buffer/SkCommandBufferGLContext.h
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/src/core/SkString.cpp
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/src/gpu/GrContextFactory.cpp
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/src/gpu/GrContextFactory.h
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/src/gpu/gl/SkNullGLContext.cpp
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/src/gpu/gl/angle/SkANGLEGLContext.cpp
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/src/gpu/gl/debug/SkDebugGLContext.h
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/src/gpu/gl/mesa/SkMesaGLContext.h
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/tests/GLProgramsTest.cpp
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/tests/GrContextFactoryTest.cpp
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/tests/StringTest.cpp
[delete] http://crrev.com/c53b82ec0ec496bed8060f73d605347ee65f2543/tests/TestConfigParsing.cpp
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/tools/flags/SkCommandLineFlags.cpp
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/tools/flags/SkCommandLineFlags.h
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/tools/flags/SkCommonFlags.cpp
[modify] http://crrev.com/0f515bd4284ee6e88cd04c62cb6c67e1f23db616/tools/flags/SkCommonFlags.h
[delete] http://crrev.com/c53b82ec0ec496bed8060f73d605347ee65f2543/tools/flags/SkCommonFlagsConfig.cpp
[delete] http://crrev.com/c53b82ec0ec496bed8060f73d605347ee65f2543/tools/flags/SkCommonFlagsConfig.h

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180

commit 3e980c3d88fbc509b79e7ccef16ca38f5bbfb180
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Wed Dec 23 09:33:00 2015

Add config options to run different GPU APIs to dm and nanobench

Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
    --config:	type: string	default: 565 8888 gpu nonrendering
        Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
        nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
        xps or use extended form 'backend(option=value,...)'.

        Extended form: 'backend(option=value,...)'

        Possible backends and options:

        gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
        	api	type: string	default: native.
        	    Select graphics API to use with gpu backend.
        	    Options:
        		native			Use platform default OpenGL or OpenGL ES backend.
        		gl    			Use OpenGL.
        		gles  			Use OpenGL ES.
        		debug 			Use debug OpenGL.
        		null  			Use null OpenGL.
        	dit	type: bool	default: false.
        	    Use device independent text.
        	nvpr	type: bool	default: false.
        	    Use NV_path_rendering OpenGL and OpenGL ES extension.
        	samples	type: int	default: 0.
        	    Use multisampling with N samples.

        Predefined configs:

        	gpu      	= gpu()
        	msaa4    	= gpu(samples=4)
        	msaa16   	= gpu(samples=16)
        	nvprmsaa4	= gpu(nvpr=true,samples=4)
        	nvprmsaa16	= gpu(nvpr=true,samples=16)
        	gpudft    	= gpu(dit=true)
        	gpudebug  	= gpu(api=debug)
        	gpunull   	= gpu(api=null)
        	debug     	= gpu(api=debug)
        	nullgpu   	= gpu(api=null)

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005

Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b

Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd

Review URL: https://codereview.chromium.org/1490113005

[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/bench/nanobench.cpp
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/dm/DM.cpp
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/dm/DMGpuSupport.h
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/dm/DMSrcSink.cpp
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/dm/DMSrcSink.h
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/gyp/flags.gyp
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/include/core/SkString.h
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/include/gpu/gl/SkNullGLContext.h
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/include/gpu/gl/angle/SkANGLEGLContext.h
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/include/gpu/gl/command_buffer/SkCommandBufferGLContext.h
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/src/core/SkString.cpp
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/src/gpu/GrContextFactory.cpp
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/src/gpu/GrContextFactory.h
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/src/gpu/gl/SkNullGLContext.cpp
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/src/gpu/gl/angle/SkANGLEGLContext.cpp
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/src/gpu/gl/debug/SkDebugGLContext.h
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/src/gpu/gl/mesa/SkMesaGLContext.h
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/tests/GLProgramsTest.cpp
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/tests/GrContextFactoryTest.cpp
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/tests/StringTest.cpp
[add] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/tests/TestConfigParsing.cpp
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/tools/flags/SkCommandLineFlags.cpp
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/tools/flags/SkCommandLineFlags.h
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/tools/flags/SkCommonFlags.cpp
[modify] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/tools/flags/SkCommonFlags.h
[add] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/tools/flags/SkCommonFlagsConfig.cpp
[add] http://crrev.com/3e980c3d88fbc509b79e7ccef16ca38f5bbfb180/tools/flags/SkCommonFlagsConfig.h

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/e3c2f80006e766eb7e99bc64911243346b3ac6d0

commit e3c2f80006e766eb7e99bc64911243346b3ac6d0
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Tue Dec 29 16:57:32 2015

Use device-independent text for nvprmsaa4/16 in nanobench and dm

Use device-independent text rendering in nanobench and dm when
using configs nvprmsaa4 or nvprmsaa16.

This was turned on for dm in commit:
"Re-enable nvpr text rendering in DM"
https://codereview.chromium.org/1306733007

This regressed in commit:
"Add config options to run different GPU APIs to dm and nanobench"
https://codereview.chromium.org/1490113005/

BUG=skia:2992
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1553453004

Review URL: https://codereview.chromium.org/1553453004

[modify] http://crrev.com/e3c2f80006e766eb7e99bc64911243346b3ac6d0/tests/TestConfigParsing.cpp
[modify] http://crrev.com/e3c2f80006e766eb7e99bc64911243346b3ac6d0/tools/flags/SkCommonFlagsConfig.cpp

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/830e012187f951d49d7e46e196ac8d1e653a25da

commit 830e012187f951d49d7e46e196ac8d1e653a25da
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Tue Jan 05 08:30:32 2016

Make SkGLContext lifetime more well-defined

Remove refcounting from SkGLContext.

SkGLContext is expected to behave like GrContextFactory would own
it, as implied by the GrContextFactory function.

If it is refcounted, this does not hold.

Also other use sites, such as in SkOSWindow_win (command buffer gl
object), confirm the behavior. The object is explicitly owned and
destroyed, not shared.

Also fixes potential crashes from using GL context of an abandoned
context.

Also fixes potential crashes in DM/nanobench, if the GrContext lives
longer than GLContext through internal refing of GrContext.

Moves the non-trivial implementations from GrContextFactory.h to
.cpp, just for consistency sake.

Changes pathops_unittest.gyp. The pathops_unittest uses
GrContextFactory, but did not link to its implementation. The reason
they worked was that the implementation used (constructors, destructors)
happened to be in the .h file.

This works towards being able to use command buffer and NVPR from
the SampleApp.

BUG=skia:2992
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1511773005

Review URL: https://codereview.chromium.org/1511773005

[modify] http://crrev.com/830e012187f951d49d7e46e196ac8d1e653a25da/bench/nanobench.cpp
[modify] http://crrev.com/830e012187f951d49d7e46e196ac8d1e653a25da/dm/DM.cpp
[modify] http://crrev.com/830e012187f951d49d7e46e196ac8d1e653a25da/gyp/pathops_unittest.gyp
[modify] http://crrev.com/830e012187f951d49d7e46e196ac8d1e653a25da/include/gpu/gl/SkGLContext.h
[modify] http://crrev.com/830e012187f951d49d7e46e196ac8d1e653a25da/src/gpu/GrContextFactory.cpp
[modify] http://crrev.com/830e012187f951d49d7e46e196ac8d1e653a25da/src/gpu/GrContextFactory.h
[modify] http://crrev.com/830e012187f951d49d7e46e196ac8d1e653a25da/tests/EGLImageTest.cpp
[modify] http://crrev.com/830e012187f951d49d7e46e196ac8d1e653a25da/tests/GrContextFactoryTest.cpp

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/54e2ca5a2338b6700fd4c147ad2f934c70ecac90

commit 54e2ca5a2338b6700fd4c147ad2f934c70ecac90
Author: jcgregorio <jcgregorio@google.com>
Date: Tue Jan 05 12:15:23 2016

Revert of Make SkGLContext lifetime more well-defined (patchset #7 id:120001 of https://codereview.chromium.org/1511773005/ )

Reason for revert:
Broke tests on Android, iOS, Mac and Windows.

Original issue's description:
> Make SkGLContext lifetime more well-defined
>
> Remove refcounting from SkGLContext.
>
> SkGLContext is expected to behave like GrContextFactory would own
> it, as implied by the GrContextFactory function.
>
> If it is refcounted, this does not hold.
>
> Also other use sites, such as in SkOSWindow_win (command buffer gl
> object), confirm the behavior. The object is explicitly owned and
> destroyed, not shared.
>
> Also fixes potential crashes from using GL context of an abandoned
> context.
>
> Also fixes potential crashes in DM/nanobench, if the GrContext lives
> longer than GLContext through internal refing of GrContext.
>
> Moves the non-trivial implementations from GrContextFactory.h to
> .cpp, just for consistency sake.
>
> Changes pathops_unittest.gyp. The pathops_unittest uses
> GrContextFactory, but did not link to its implementation. The reason
> they worked was that the implementation used (constructors, destructors)
> happened to be in the .h file.
>
> This works towards being able to use command buffer and NVPR from
> the SampleApp.
>
> BUG=skia:2992
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1511773005
>
> Committed: https://skia.googlesource.com/skia/+/830e012187f951d49d7e46e196ac8d1e653a25da

TBR=bsalomon@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1555053003

[modify] http://crrev.com/54e2ca5a2338b6700fd4c147ad2f934c70ecac90/bench/nanobench.cpp
[modify] http://crrev.com/54e2ca5a2338b6700fd4c147ad2f934c70ecac90/dm/DM.cpp
[modify] http://crrev.com/54e2ca5a2338b6700fd4c147ad2f934c70ecac90/gyp/pathops_unittest.gyp
[modify] http://crrev.com/54e2ca5a2338b6700fd4c147ad2f934c70ecac90/include/gpu/gl/SkGLContext.h
[modify] http://crrev.com/54e2ca5a2338b6700fd4c147ad2f934c70ecac90/src/gpu/GrContextFactory.cpp
[modify] http://crrev.com/54e2ca5a2338b6700fd4c147ad2f934c70ecac90/src/gpu/GrContextFactory.h
[modify] http://crrev.com/54e2ca5a2338b6700fd4c147ad2f934c70ecac90/tests/EGLImageTest.cpp
[modify] http://crrev.com/54e2ca5a2338b6700fd4c147ad2f934c70ecac90/tests/GrContextFactoryTest.cpp

Project Member Comment 49 by vollick@chromium.org, Jan 5 2016
Cc: -bsalo...@google.com
Owner: bsalo...@google.com
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d233bea10898261c3fee357a619a7afef0254bcc

commit d233bea10898261c3fee357a619a7afef0254bcc
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Tue Jan 05 18:54:38 2016

cc: Do not refcount SkNullGLContext

Use SkNullGLContext with normal ownership semantics
instead of refcount semantics. This allows SkGLContext
to be changed from refcounted object to normally owned
object.

Also calls different, non-deprecated constructor for
the class.

BUG=skia:2992
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1556043009

Cr-Commit-Position: refs/heads/master@{#367596}

[modify] http://crrev.com/d233bea10898261c3fee357a619a7afef0254bcc/cc/test/test_context_provider.cc
[modify] http://crrev.com/d233bea10898261c3fee357a619a7afef0254bcc/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/3405800d7a5407365143eed93e300fd5896cacee

commit 3405800d7a5407365143eed93e300fd5896cacee
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Thu Jan 07 07:49:30 2016

Make SkGLContext lifetime more well-defined

Remove refcounting from SkGLContext.

SkGLContext is expected to behave like GrContextFactory would own
it, as implied by the GrContextFactory function.

If it is refcounted, this does not hold.

Also other use sites, such as in SkOSWindow_win (command buffer gl
object), confirm the behavior. The object is explicitly owned and
destroyed, not shared.

Also fixes potential crashes from using GL context of an abandoned
context.

Also fixes potential crashes in DM/nanobench, if the GrContext lives
longer than GLContext through internal refing of GrContext.

Moves the non-trivial implementations from GrContextFactory.h to
.cpp, just for consistency sake.

Changes pathops_unittest.gyp. The pathops_unittest uses
GrContextFactory, but did not link to its implementation. The reason
they worked was that the implementation used (constructors, destructors)
happened to be in the .h file.

This works towards being able to use command buffer and NVPR from
the SampleApp.

BUG=skia:2992
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1511773005

Committed: https://skia.googlesource.com/skia/+/830e012187f951d49d7e46e196ac8d1e653a25da

Review URL: https://codereview.chromium.org/1511773005

[modify] http://crrev.com/3405800d7a5407365143eed93e300fd5896cacee/bench/nanobench.cpp
[modify] http://crrev.com/3405800d7a5407365143eed93e300fd5896cacee/dm/DM.cpp
[modify] http://crrev.com/3405800d7a5407365143eed93e300fd5896cacee/gyp/pathops_unittest.gyp
[modify] http://crrev.com/3405800d7a5407365143eed93e300fd5896cacee/include/gpu/gl/SkGLContext.h
[modify] http://crrev.com/3405800d7a5407365143eed93e300fd5896cacee/src/gpu/GrContextFactory.cpp
[modify] http://crrev.com/3405800d7a5407365143eed93e300fd5896cacee/src/gpu/GrContextFactory.h
[modify] http://crrev.com/3405800d7a5407365143eed93e300fd5896cacee/tests/EGLImageTest.cpp
[modify] http://crrev.com/3405800d7a5407365143eed93e300fd5896cacee/tests/GrContextFactoryTest.cpp

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b01b354b22648b2d8c98efa2e5bde24915d77edb

commit b01b354b22648b2d8c98efa2e5bde24915d77edb
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Fri Jan 22 09:29:17 2016

command_buffer_gles2: Fix command-line arguments if they are passed

Set the command-line arguments correctly if they are passed
with CHROME_COMMAND_BUFFER_GLES2_ARGS.

Previously the first argument would go in the place of the app name.

Also initialize the command-line on Windows.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1613103002

Cr-Commit-Position: refs/heads/master@{#370930}

[modify] http://crrev.com/b01b354b22648b2d8c98efa2e5bde24915d77edb/gpu/gles2_conform_support/egl/egl.cc

Labels: merge-merged-2628
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b01b354b22648b2d8c98efa2e5bde24915d77edb

commit b01b354b22648b2d8c98efa2e5bde24915d77edb
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Fri Jan 22 09:29:17 2016

command_buffer_gles2: Fix command-line arguments if they are passed

Set the command-line arguments correctly if they are passed
with CHROME_COMMAND_BUFFER_GLES2_ARGS.

Previously the first argument would go in the place of the app name.

Also initialize the command-line on Windows.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1613103002

Cr-Commit-Position: refs/heads/master@{#370930}

[modify] http://crrev.com/b01b354b22648b2d8c98efa2e5bde24915d77edb/gpu/gles2_conform_support/egl/egl.cc

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/9f63b442344eca60a92cff512c255b540930aa15

commit 9f63b442344eca60a92cff512c255b540930aa15
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Mon Jan 25 08:31:49 2016

Make BGRA8888 renderable on CHROMIUM_framebuffer_mixed_samples

Make BGRA8888 renderable on CHROMIUM_framebuffer_mixed_samples.

BUG=skia:2992
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1615833002

Review URL: https://codereview.chromium.org/1615833002

[modify] http://crrev.com/9f63b442344eca60a92cff512c255b540930aa15/src/gpu/gl/GrGLCaps.cpp

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/7bdb05d5c294eb332a18d09b81a99ed1125c9525

commit 7bdb05d5c294eb332a18d09b81a99ed1125c9525
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Mon Jan 25 08:47:23 2016

Do not try to get fragment input locations with CHROMIUM_path_rendering

Do not try to get fragment input locations with CHROMIUM_path_rendering,
it uses the binding mechanism in CHROMIUM_path_rendering

BUG=skia:2992
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1618773002

Review URL: https://codereview.chromium.org/1618773002

[modify] http://crrev.com/7bdb05d5c294eb332a18d09b81a99ed1125c9525/src/gpu/gl/builders/GrGLProgramBuilder.cpp

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/37c37504085029aa3c933eacbda934551230cfb9

commit 37c37504085029aa3c933eacbda934551230cfb9
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Mon Jan 25 08:48:26 2016

command_buffer_gles2: Avoid creating multiple AtExitManagers

Avoid creating multiple AtExitManagers when libcommand_buffer_gles2
creates multiple EGL displays.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1617653003

Cr-Commit-Position: refs/heads/master@{#371205}

[modify] http://crrev.com/37c37504085029aa3c933eacbda934551230cfb9/gpu/gles2_conform_support/egl/display.cc
[modify] http://crrev.com/37c37504085029aa3c933eacbda934551230cfb9/gpu/gles2_conform_support/egl/display.h
[modify] http://crrev.com/37c37504085029aa3c933eacbda934551230cfb9/gpu/gles2_conform_support/egl/egl.cc

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ef49d533528742e7795c36fd717fd2b6a64c1627

commit ef49d533528742e7795c36fd717fd2b6a64c1627
Author: kkinnunen <kkinnunen@nvidia.com>
Date: Wed Feb 03 07:47:00 2016

command_buffer_gles2: Avoid crashing for lack of JNI

Do not use Java environment to detect device model when command buffer
is built as a standalone library.
EGL API can not be used to pass the JNI from client to the library,
and the client might not be a Java application anyway.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1656223003

Cr-Commit-Position: refs/heads/master@{#373195}

[modify] http://crrev.com/ef49d533528742e7795c36fd717fd2b6a64c1627/gpu/config/gpu_info_collector_android.cc

Project Member Comment 59 by bugdroid1@chromium.org, Feb 19 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c22b484a0aaabbfbce221b419da48bca080e7826

commit c22b484a0aaabbfbce221b419da48bca080e7826
Author: svaisanen <svaisanen@nvidia.com>
Date: Fri Feb 19 14:42:28 2016

Only call gles2::Terminate when all Display objects are deleted

Implementation in command buffer EGL calls gles2::Terminate and gles2::Initialize incorrectly. If there are multiple Display objects each will call Initialize and Terminate and creates and frees the TLS allocated context key twice. It should only be created once and freed once all the Displays are deleted.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1674223002

Cr-Commit-Position: refs/heads/master@{#376439}

[modify] https://crrev.com/c22b484a0aaabbfbce221b419da48bca080e7826/gpu/command_buffer/tests/egl_test.cc
[modify] https://crrev.com/c22b484a0aaabbfbce221b419da48bca080e7826/gpu/gles2_conform_support/egl/display.cc

Project Member Comment 60 by bugdroid1@chromium.org, Feb 19 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/be8017a38ab65cf3e2e9692767c23f15144be686

commit be8017a38ab65cf3e2e9692767c23f15144be686
Author: markusheintz <markusheintz@chromium.org>
Date: Fri Feb 19 15:49:31 2016

Revert of Only call gles2::Terminate when all Display objects are deleted (patchset #3 id:40001 of  )

Reason for revert:
Does not compile on win
c:\b\build\slave\win\build\src\gpu\command_buffer\tests\egl_test.cc(87) : error C2059: syntax error : '('
c:\b\build\slave\win\build\src\gpu\command_buffer\tests\egl_test.cc(90) : error C2061: syntax error : identifier 'glEnableProc'
c:\b\build\slave\win\build\src\gpu\command_buffer\tests\egl_test.cc(91) : error C3536: 'GLES2Enable': cannot be used before it is initialized
c:\b\build\slave\win\build\src\gpu\command_buffer\tests\egl_test.cc(91) : error C2064: term does not evaluate to a function taking 1 arguments

https://build.chromium.org/p/chromium/builders/Win/builds/40478/steps/compile/logs/stdio

Original issue's description:
> Only call gles2::Terminate when all Display objects are deleted
>
> Implementation in command buffer EGL calls gles2::Terminate and gles2::Initialize incorrectly. If there are multiple Display objects each will call Initialize and Terminate and creates and frees the TLS allocated context key twice. It should only be created once and freed once all the Displays are deleted.
>
> BUG=skia:2992
>
> Committed: https://crrev.com/c22b484a0aaabbfbce221b419da48bca080e7826
> Cr-Commit-Position: refs/heads/master@{#376439}

TBR=piman@chromium.org,kkinnunen@nvidia.com,svaisanen@nvidia.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1714023002

Cr-Commit-Position: refs/heads/master@{#376443}

[modify] https://crrev.com/be8017a38ab65cf3e2e9692767c23f15144be686/gpu/command_buffer/tests/egl_test.cc
[modify] https://crrev.com/be8017a38ab65cf3e2e9692767c23f15144be686/gpu/gles2_conform_support/egl/display.cc

Project Member Comment 61 by bugdroid1@chromium.org, Feb 19 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8430468e13d9b71231c0febf277b56ebdfcb5301

commit 8430468e13d9b71231c0febf277b56ebdfcb5301
Author: svaisanen <svaisanen@nvidia.com>
Date: Fri Feb 19 16:40:04 2016

Use eglBindAPI to choose the correct (EGL_ES) API

If the calling thread has chosen another EGL API before
the call to eglCreateContext can fail surprisingly,
so a call to eglBindAPI is needed before eglCreateContext.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1657003003

Cr-Commit-Position: refs/heads/master@{#376454}

[modify] https://crrev.com/8430468e13d9b71231c0febf277b56ebdfcb5301/ui/gl/gl_context_egl.cc

Project Member Comment 62 by bugdroid1@chromium.org, Apr 11 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2e4bd66751deee422cf15bd991b77b54a10b8278

commit 2e4bd66751deee422cf15bd991b77b54a10b8278
Author: svaisanen <svaisanen@nvidia.com>
Date: Mon Apr 11 07:34:21 2016

Add check for Java VM in Android's SysInfo::IsLowEndDevice()

Android's SysInfo::IsLowEndDevice() calls into Java SysUtils
and thus expects to have a Java VM setup. However when using
command buffer as a standalone library VM doesn't exist.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1769503002

Cr-Commit-Position: refs/heads/master@{#386343}

[modify] https://crrev.com/2e4bd66751deee422cf15bd991b77b54a10b8278/base/sys_info_android.cc

Sign in to add a comment