Commit Graph

160 Commits

Author SHA1 Message Date
mtklein
928e16565f Move headers used by headers in include/ to include/private.
Some of this is transitive, like SkRecords.h used by SkMiniRecorder.h
used by (public) SkPictureRecorder.h.

BUG=skia:

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

Review URL: https://codereview.chromium.org/1217293004
2015-07-01 11:55:42 -07:00
jvanverth
4417c7f8bb Revert "Move headers used by headers in include/ to include/private."
This reverts commit a89f55198b.

Reason: breaking the roll.

TBR=mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1216033008
2015-07-01 09:45:46 -07:00
mtklein
a89f55198b Move headers used by headers in include/ to include/private.
Some of this is transitive, like SkRecords.h used by SkMiniRecorder.h
used by (public) SkPictureRecorder.h.

BUG=skia:

Review URL: https://codereview.chromium.org/1217293004
2015-07-01 08:41:15 -07:00
kkinnunen
cfe62e3084 Cleanup legacy NVPR-related definitions
Fixed-function NVPR codepaths were removed a while ago. Only NVPR API
version 1.3 (PathFragmentInputGen) was left working. Remove
backwards-compatibility code that was left behind.

Remove some NVPR API function typedefs that were left from initial
commits.

Remove PathCoords function pointer from GrGLInterface, it has
never been called and causes problems in the future, since it will
not be implemented in the Chromium pseudo extension.

Avoid failing interface creation even if nvprmsaaXX config is
requested but the driver is not recent enough. The SAN bots have
old driver, but try to run nvprmsaa16 configs. Instead, print
out a warning.

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

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

Review URL: https://codereview.chromium.org/1177243004
2015-07-01 02:58:50 -07:00
jvanverth
439f23e563 Revert of Cleanup legacy NVPR-related definitions (patchset #4 id:60001 of https://codereview.chromium.org/1177243004/)
Reason for revert:
Breaks the Ubuntu *SAN bots.

Original issue's description:
> Cleanup legacy NVPR-related definitions
>
> Fixed-function NVPR codepaths were removed a while ago. Only NVPR API
> version 1.3 (PathFragmentInputGen) was left working. Remove
> backwards-compatibility code that was left behind.
>
> Remove some NVPR API function typedefs that were left from initial
> commits.
>
> Remove PathCoords function pointer from GrGLInterface, it has
> never been called and causes problems in the future, since it will
> not be implemented in the Chromium pseudo extension.
>
> Committed: https://skia.googlesource.com/skia/+/fb8d6884e0e01d0c2f8596adf5af1efb0d08de7e
>
> Committed: https://skia.googlesource.com/skia/+/e35b5d99d8dfcc6b2be844df28cba47436380809

TBR=joshualitt@google.com,cdalton@nvidia.com,bsalomon@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1219663005
2015-06-30 09:40:38 -07:00
kkinnunen
e35b5d99d8 Cleanup legacy NVPR-related definitions
Fixed-function NVPR codepaths were removed a while ago. Only NVPR API
version 1.3 (PathFragmentInputGen) was left working. Remove
backwards-compatibility code that was left behind.

Remove some NVPR API function typedefs that were left from initial
commits.

Remove PathCoords function pointer from GrGLInterface, it has
never been called and causes problems in the future, since it will
not be implemented in the Chromium pseudo extension.

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

Review URL: https://codereview.chromium.org/1177243004
2015-06-30 03:59:50 -07:00
mtklein
2766c00fc0 remove SkInstCnt
It's been outclassed by Valgrind and leak sanitizer,
and it seems to be causing problems for external folks building Skia.

I'm not sure why our own builds seem unaffected.

Latest thread:
https://groups.google.com/forum/#!topic/skia-discuss/oj9FsQwwSF0

BUG=skia:

Review URL: https://codereview.chromium.org/1217573002
2015-06-26 11:45:03 -07:00
fmalita
538bacb4bb Revert of Cleanup legacy NVPR-related definitions (patchset #3 id:40001 of https://codereview.chromium.org/1177243004/)
Reason for revert:
Broke the GPU SAN bots: https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Debug-ASAN/builds/779/steps/dm/logs/stdio

Original issue's description:
> Cleanup legacy NVPR-related definitions
>
> Fixed-function NVPR codepaths were removed a while ago. Only NVPR API
> version 1.3 (PathFragmentInputGen) was left working. Remove
> backwards-compatibility code that was left behind.
>
> Remove some NVPR API function typedefs that were left from initial
> commits.
>
> Remove PathCoords function pointer from GrGLInterface, it has
> never been called and causes problems in the future, since it will
> not be implemented in the Chromium pseudo extension.
>
> Committed: https://skia.googlesource.com/skia/+/fb8d6884e0e01d0c2f8596adf5af1efb0d08de7e

TBR=joshualitt@google.com,cdalton@nvidia.com,bsalomon@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1206333003
2015-06-25 08:42:24 -07:00
kkinnunen
fb8d6884e0 Cleanup legacy NVPR-related definitions
Fixed-function NVPR codepaths were removed a while ago. Only NVPR API
version 1.3 (PathFragmentInputGen) was left working. Remove
backwards-compatibility code that was left behind.

Remove some NVPR API function typedefs that were left from initial
commits.

Remove PathCoords function pointer from GrGLInterface, it has
never been called and causes problems in the future, since it will
not be implemented in the Chromium pseudo extension.

Review URL: https://codereview.chromium.org/1177243004
2015-06-25 02:06:56 -07:00
bsalomon
47c1ccbcd8 Revert of remove workaround for dx9 angle slow rgba pixel ops (patchset #1 id:1 of https://codereview.chromium.org/1207003002/)
Reason for revert:
users are still on dx9 angle :(

Original issue's description:
> remove workaround for dx9 angle slow rgba pixel ops
>
> TBR=robertphillips@google.com
>
> Committed: https://skia.googlesource.com/skia/+/1e1adc33ba1acb9a2ad41c0a5a9b6166ee9d7a2a

TBR=robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1205183002
2015-06-24 15:04:13 -07:00
bsalomon
1e1adc33ba remove workaround for dx9 angle slow rgba pixel ops
TBR=robertphillips@google.com

Review URL: https://codereview.chromium.org/1207003002
2015-06-24 13:22:50 -07:00
cdalton
d416a5b10f Implement SkGLContext swapBuffers with fence syncs
Improves the GPU measuring accuracy of nanobench by using fence syncs.
Fence syncs are very widely supported and available on almost every
platform.

NO_MERGE_BUILDS
BUG=skia:

Review URL: https://codereview.chromium.org/1194783003
2015-06-23 13:23:44 -07:00
kkinnunen
591a2ca842 Stop using the NVPR glyph loading functionality
Remove the NVPR glyph loading functionality. A bit risky feature.

Review URL: https://codereview.chromium.org/1176113008
2015-06-23 07:27:41 -07:00
tomhudson
3fef728e16 Fix indirect use of defined() directive
BUG=432391
R=bsalomon,bungeman1

Review URL: https://codereview.chromium.org/876933004
2015-06-23 06:31:32 -07:00
bsalomon
6dc6f5f4a1 Add support for creating texture backed images where Skia will delete the texture.
Review URL: https://codereview.chromium.org/1187523005
2015-06-18 09:12:17 -07:00
cdalton
626e1ffe84 Import functionality for new GL backend
Brings in the following functionality:

  ARB_draw_instanced
  ARB_instanced_arrays
  NV_bindless_texture
  EXT_direct_state_access
  KHR_debug

Also cleans up some of the NVPR extension loading.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/202c4c75fb806f751cf796850bf67fe9793e0643

Review URL: https://codereview.chromium.org/1185573003
2015-06-12 13:56:46 -07:00
djsollen
1fe1858a90 Revert of Import functionality for new GL backend (patchset #2 id:20001 of https://codereview.chromium.org/1185573003/)
Reason for revert:
breaking multiple builds. For example...

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Debug-ASAN/builds/667

Original issue's description:
> Import functionality for new GL backend
>
> Brings in the following functionality:
>
>   ARB_draw_instanced
>   ARB_instanced_arrays
>   NV_bindless_texture
>   EXT_direct_state_access
>   KHR_debug
>
> Also cleans up some of the NVPR extension loading.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/202c4c75fb806f751cf796850bf67fe9793e0643

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

Review URL: https://codereview.chromium.org/1184863002
2015-06-12 12:01:15 -07:00
cdalton
202c4c75fb Import functionality for new GL backend
Brings in the following functionality:

  ARB_draw_instanced
  ARB_instanced_arrays
  NV_bindless_texture
  EXT_direct_state_access
  KHR_debug

Also cleans up some of the NVPR extension loading.

BUG=skia:

Review URL: https://codereview.chromium.org/1185573003
2015-06-12 10:31:36 -07:00
cdalton
0edea2c8e7 Make mixed samples contingent on auxiliary extensions
Moves the cap for mixed samples into GrShaderCaps and does not enable
it unless we have support for both dual source blending and
multisample disable.

Creates a dedicated cap for multisample disable.

Reconfigures the mixed samples cap to indicate the collective
capability of three different extensions:

  GL_NV_framebuffer_mixed_samples
  GL_NV_sample_mask_override_coverage
  GL_EXT_raster_multisample

Imports tokens and procedures for GL_EXT_raster_multisample.

BUG=skia:

Review URL: https://codereview.chromium.org/1151793002
2015-05-21 08:27:44 -07:00
cdalton
bae6f6c3ec Add tokens and entry points for KHR_blend_equation_advanced
Also adds glBlendEquation, which the extension interacts with, to the
core of GrGLInterface. Validation of this function is temporarily
disabled until Chrome hooks it up.

BUG=skia:

Review URL: https://codereview.chromium.org/1039693004
2015-04-22 10:39:03 -07:00
tomhudson
2575f317d3 Revert of Add tokens and entry points for KHR_blend_equation_advanced (patchset #3 id:40001 of https://codereview.chromium.org/1039693004/)
Reason for revert:
We're getting repeated crashes since this CL landed when we try to evaluate a roll into Chrome on our bots. (https://uberchromegw.corp.google.com/i/client.skia/builders/Linux%20Tests/builds/1902)

Our initial reflex is to put a #if 0 around this code (just like the immediately following lines 334-338 in GrGLInterface.cpp), but the error isn't what the GPU team expected to see if that was all we needed, so we're reverting now and asking you to resubmit tomorrow after running more thorough tests.

Original issue's description:
> Add tokens and entry points for KHR_blend_equation_advanced
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/8e578859f80b46a63144add215955221017d3609

TBR=markkilgard@gmail.com,bsalomon@google.com,cdalton@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1101593002
2015-04-21 14:16:53 -07:00
cdalton
8e578859f8 Add tokens and entry points for KHR_blend_equation_advanced
BUG=skia:

Review URL: https://codereview.chromium.org/1039693004
2015-04-21 12:34:09 -07:00
cdalton
fd4167ddf1 Import glTextureBarrier
BUG=skia:

Review URL: https://codereview.chromium.org/1090163002
2015-04-21 11:45:56 -07:00
vbuzinov
08b4d29a0a GrGLInterface: Add support for NV_framebuffer_mixed_samples
Import glCoverageModulation if NV_framebuffer_mixed samples
is available

BUG=skia:3177

Review URL: https://codereview.chromium.org/993363002
2015-04-01 06:29:49 -07:00
mtklein
36352bf5e3 C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}
NOPRESUBMIT=true

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002

Review URL: https://codereview.chromium.org/1037793002
2015-03-25 18:17:32 -07:00
bsalomon
93276c683d Remove EGL header from SkANGLELContext.h
TBR=egdaniel@google.com

Review URL: https://codereview.chromium.org/947263002
2015-02-23 10:51:13 -08:00
bsalomon
c01f47b759 Remove unnecessary include of gles2 header in SkANGLEGLContext.h
TBR=robertphillips@google.com

Review URL: https://codereview.chromium.org/949973002
2015-02-23 10:06:44 -08:00
bsalomon
42380174ca Use D3D11 backend for ANGLE when available.
Review URL: https://codereview.chromium.org/954453002
2015-02-23 08:57:23 -08:00
joshualitt
43466a1ade Multi-string shaders
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/1c3c2d83364ee228e0751df0e1b9c161c0ba8c1e

Review URL: https://codereview.chromium.org/929503002
2015-02-13 17:18:27 -08:00
joshualitt
b8a82f2bce Revert of Multi-string shaders (patchset #4 id:60001 of https://codereview.chromium.org/929503002/)
Reason for revert:
windows warnings

Original issue's description:
> Multi-string shaders
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/1c3c2d83364ee228e0751df0e1b9c161c0ba8c1e

TBR=bsalomon@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/924973002
2015-02-13 16:31:46 -08:00
joshualitt
1c3c2d8336 Multi-string shaders
BUG=skia:

Review URL: https://codereview.chromium.org/929503002
2015-02-13 16:23:49 -08:00
bsalomon
3740972d02 Make null GL context use callback to make current
Review URL: https://codereview.chromium.org/919783002
2015-02-11 14:19:18 -08:00
bsalomon
bb0502eec5 Support multiple null GL contexts on a thread.
This has the side effect of requiring SkNullGLContext to use the null GL interface.

It exposes SkNullGLContext and also removes null context support from SampleApp.

Review URL: https://codereview.chromium.org/916733002
2015-02-11 11:11:11 -08:00
mtklein
72c9faab45 Fix up all the easy virtual ... SK_OVERRIDE cases.
This fixes every case where virtual and SK_OVERRIDE were on the same line,
which should be the bulk of cases.  We'll have to manually clean up the rest
over time unless I level up in regexes.

for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end

BUG=skia:

Review URL: https://codereview.chromium.org/806653007
2015-01-09 10:06:40 -08:00
bsalomon
ee64d6ef49 Add glGetShaderPrecisionFormat
Review URL: https://codereview.chromium.org/778703003
2014-12-03 10:46:08 -08:00
djsollen
e4545210c9 Cleanup GrContextFactory and make it's subclasses private
Review URL: https://codereview.chromium.org/723183002
2014-11-13 11:12:41 -08:00
mtklein
2ecf86e55e Revert of Revert of Turn on NVPR 4x MSAA by default when supported in DM and nanobench. (patchset #1 id:1 of https://codereview.chromium.org/693933004/)
Reason for revert:
Try again with loops overflow fix landed.

Original issue's description:
> Revert of Turn on NVPR 4x MSAA by default when supported in DM and nanobench. (patchset #2 id:20001 of https://codereview.chromium.org/704563003/)
>
> Reason for revert:
> Timing out on nvpr when drawing conics. Fix will take some thought so reverting for now.
>
> Original issue's description:
> > Turn on NVPR 4x MSAA by default when supported in DM and nanobench.
> >
> > This brings DM and nanobench's default configs in line with GM's.
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/31f88675718966bbb7f09718b40de10c7e214739
>
> TBR=bsalomon@google.com,mtklein@google.com,mtklein@chromium.org
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/d5cd4ee5b81b51e43be7ed13f3c0f0f6c1b3fe14

TBR=bsalomon@google.com,mtklein@chromium.org,egdaniel@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/685923003
2014-11-06 08:06:39 -08:00
egdaniel
d5cd4ee5b8 Revert of Turn on NVPR 4x MSAA by default when supported in DM and nanobench. (patchset #2 id:20001 of https://codereview.chromium.org/704563003/)
Reason for revert:
Timing out on nvpr when drawing conics. Fix will take some thought so reverting for now.

Original issue's description:
> Turn on NVPR 4x MSAA by default when supported in DM and nanobench.
>
> This brings DM and nanobench's default configs in line with GM's.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/31f88675718966bbb7f09718b40de10c7e214739

TBR=bsalomon@google.com,mtklein@google.com,mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/693933004
2014-11-05 14:21:33 -08:00
mtklein
31f8867571 Turn on NVPR 4x MSAA by default when supported in DM and nanobench.
This brings DM and nanobench's default configs in line with GM's.

BUG=skia:

Review URL: https://codereview.chromium.org/704563003
2014-11-05 12:28:26 -08:00
tfarina
38406c82b9 Cleanup: Go with SkDebugf instead of GrPrintf.
Since GrPrintf is just defined to SkDebugf, we can go with the later
directly.

BUG=None
TEST=None
R=bsalomon@google.com

Review URL: https://codereview.chromium.org/695663003
2014-10-31 07:11:12 -07:00
joshualitt
0e602827df Working patch to remove constant attributes. This may cause some gm mismatches, I will rebaseline tonight.
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/84c94c0dfd1e12e97d8a835882dda575f36e41d2

Committed: https://skia.googlesource.com/skia/+/95f5194abce19e8ed875f3495fd16c79a9b931b4

Review URL: https://codereview.chromium.org/678073005
2014-10-28 10:27:44 -07:00
joshualitt
98102a8f79 Revert of Patch to remove constant attributes (patchset #8 id:120002 of https://codereview.chromium.org/678073005/)
Reason for revert:
I'll checkin tonight when the tree is quieter

Original issue's description:
> Working patch to remove constant attributes.  This may cause some gm mismatches, I will rebaseline tonight.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/84c94c0dfd1e12e97d8a835882dda575f36e41d2
>
> Committed: https://skia.googlesource.com/skia/+/95f5194abce19e8ed875f3495fd16c79a9b931b4

TBR=bsalomon@google.com,egdaniel@google.com,joshualitt@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/683203002
2014-10-28 09:08:35 -07:00
joshualitt
95f5194abc Working patch to remove constant attributes. This may cause some gm mismatches, I will rebaseline tonight.
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/84c94c0dfd1e12e97d8a835882dda575f36e41d2

Review URL: https://codereview.chromium.org/678073005
2014-10-28 07:54:54 -07:00
joshualitt
9f2825f249 Revert of Patch to remove constant attributes (patchset #6 id:100001 of https://codereview.chromium.org/678073005/)
Reason for revert:
Breaks the K1

Original issue's description:
> Working patch to remove constant attributes.  This may cause some gm mismatches, I will rebaseline tonight.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/84c94c0dfd1e12e97d8a835882dda575f36e41d2

TBR=bsalomon@google.com,egdaniel@google.com,joshualitt@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/679363002
2014-10-27 17:56:18 -07:00
joshualitt
84c94c0dfd Working patch to remove constant attributes. This may cause some gm mismatches, I will rebaseline tonight.
BUG=skia:

Review URL: https://codereview.chromium.org/678073005
2014-10-27 15:33:33 -07:00
egdaniel
27c1521ccf Add gpu support for glVertexAttrb1f, 2fv, and 3fv
BUG=skia:

Review URL: https://codereview.chromium.org/662583003
2014-10-24 15:00:50 -07:00
kkinnunen
30bc88ccd5 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
2014-10-15 23:03:54 -07:00
kkinnunen
9e61bb7815 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
2014-10-09 05:24:15 -07:00
bsalomon
10805961ce 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
2014-10-08 04:45:10 -07:00
kkinnunen
a90ed4e838 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
2014-10-08 04:14:24 -07:00