Line data Source code
1 : /*
2 : * Copyright 2014 Google Inc.
3 : *
4 : * Use of this source code is governed by a BSD-style license that can be
5 : * found in the LICENSE file.
6 : */
7 :
8 : #include "GrCoordTransform.h"
9 : #include "GrResourceProvider.h"
10 : #include "GrTextureProxy.h"
11 :
12 0 : void GrCoordTransform::reset(GrResourceProvider* resourceProvider, const SkMatrix& m,
13 : GrTextureProxy* proxy, bool normalize) {
14 0 : SkASSERT(proxy);
15 0 : SkASSERT(!fInProcessor);
16 :
17 0 : fMatrix = m;
18 : // MDB TODO: just GrCaps is needed for this method
19 : // MDB TODO: once all the coord transforms take a proxy just store it here and
20 : // instantiate later
21 0 : fTexture = proxy->instantiate(resourceProvider);
22 0 : fNormalize = normalize;
23 0 : fReverseY = kBottomLeft_GrSurfaceOrigin == proxy->origin();
24 0 : }
|