Update SkSurface::ReplaceBackendTexture to take ContentChangeMode

In SkSurface::ReplaceBackendTexture, it used to always retain a copy
of the the current content. The ContentChangeMode is added as a
parameter to allow the callers to decide whether retain or discard the
current content.

Bug: 1014246

Change-Id: I8736e7795b4755bbde94009ffe4d943c75112b98
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271016
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
8 files changed