blob: 4767e53d69416d8a15125fc335c4291bde05a850 [file] [log] [blame]
/*
* Copyright 2014 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrCoordTransform.h"
#include "GrResourceProvider.h"
#include "GrTextureProxy.h"
void GrCoordTransform::reset(GrResourceProvider* resourceProvider, const SkMatrix& m,
GrTextureProxy* proxy, bool normalize) {
SkASSERT(proxy);
SkASSERT(!fInProcessor);
fMatrix = m;
// MDB TODO: just GrCaps is needed for this method
// MDB TODO: once all the coord transforms take a proxy just store it here and
// instantiate later
fTexture = proxy->instantiateTexture(resourceProvider);
fNormalize = normalize;
fReverseY = kBottomLeft_GrSurfaceOrigin == proxy->origin();
}