OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The Android Open Source Project | 2 * Copyright 2012 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkBitmap.h" | 8 #include "SkBitmap.h" |
9 #include "SkMagnifierImageFilter.h" | 9 #include "SkMagnifierImageFilter.h" |
10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
11 #include "SkReadBuffer.h" | 11 #include "SkReadBuffer.h" |
12 #include "SkWriteBuffer.h" | 12 #include "SkWriteBuffer.h" |
13 #include "SkValidationUtils.h" | 13 #include "SkValidationUtils.h" |
14 | 14 |
15 //////////////////////////////////////////////////////////////////////////////// | 15 //////////////////////////////////////////////////////////////////////////////// |
16 #if SK_SUPPORT_GPU | 16 #if SK_SUPPORT_GPU |
17 #include "GrInvariantOutput.h" | 17 #include "GrInvariantOutput.h" |
18 #include "effects/GrSingleTextureEffect.h" | 18 #include "effects/GrSingleTextureEffect.h" |
19 #include "gl/GrGLProcessor.h" | 19 #include "gl/GrGLFragmentProcessor.h" |
20 #include "gl/GrGLTexture.h" | 20 #include "gl/GrGLTexture.h" |
21 #include "gl/builders/GrGLProgramBuilder.h" | 21 #include "gl/builders/GrGLProgramBuilder.h" |
22 | 22 |
23 class GrMagnifierEffect : public GrSingleTextureEffect { | 23 class GrMagnifierEffect : public GrSingleTextureEffect { |
24 | 24 |
25 public: | 25 public: |
26 static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager, | 26 static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager, |
27 GrTexture* texture, | 27 GrTexture* texture, |
28 const SkRect& bounds, | 28 const SkRect& bounds, |
29 float xOffset, | 29 float xOffset, |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 | 388 |
389 #ifndef SK_IGNORE_TO_STRING | 389 #ifndef SK_IGNORE_TO_STRING |
390 void SkMagnifierImageFilter::toString(SkString* str) const { | 390 void SkMagnifierImageFilter::toString(SkString* str) const { |
391 str->appendf("SkMagnifierImageFilter: ("); | 391 str->appendf("SkMagnifierImageFilter: ("); |
392 str->appendf("src: (%f,%f,%f,%f) ", | 392 str->appendf("src: (%f,%f,%f,%f) ", |
393 fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBotto
m); | 393 fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBotto
m); |
394 str->appendf("inset: %f", fInset); | 394 str->appendf("inset: %f", fInset); |
395 str->append(")"); | 395 str->append(")"); |
396 } | 396 } |
397 #endif | 397 #endif |
OLD | NEW |