glDiscardFramebuffer() in GrGpuGL::discard uses invalid GLenum
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 16 Apr 2014 14:33:27 +0000 (14:33 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 16 Apr 2014 14:33:27 +0000 (14:33 +0000)
commit4453e8b45aaaaea568da35f8144177bdc8d2e171
treeed30b517d11bdb6046284fd71d6a2bf08a23339f
parentab16445ae8cdb421a42e1d3f963d86112f53ddf8
glDiscardFramebuffer() in GrGpuGL::discard uses invalid GLenum

According to the spec:

  "If a framebuffer object is bound to <target>, then <attachments> may
  contain COLOR_ATTACHMENT0, DEPTH_ATTACHMENT, and/or
  STENCIL_ATTACHMENT.  If the framebuffer object is not complete,
  DiscardFramebufferEXT may be ignored.

  If the default framebuffer is bound to <target>,
  then <attachment> may contain COLOR, identifying the color buffer;
  DEPTH, identifying the depth buffer; or STENCIL, identifying the
  stencil buffer."

Do the same as in glInvalidateFramebuffer() case.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
R=bsalomon@google.com
BUG=skia:2411

Author: siglesias@igalia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14220 2bbb7eff-a529-9590-31e7-b0007b416f81
src/gpu/gl/GrGpuGL.cpp