| 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/GrGLProcessor.h" |
| 20 #include "gl/GrGLSL.h" | |
| 21 #include "gl/GrGLTexture.h" | 20 #include "gl/GrGLTexture.h" |
| 22 #include "gl/builders/GrGLProgramBuilder.h" | 21 #include "gl/builders/GrGLProgramBuilder.h" |
| 23 | 22 |
| 24 class GrMagnifierEffect : public GrSingleTextureEffect { | 23 class GrMagnifierEffect : public GrSingleTextureEffect { |
| 25 | 24 |
| 26 public: | 25 public: |
| 27 static GrFragmentProcessor* Create(GrTexture* texture, | 26 static GrFragmentProcessor* Create(GrTexture* texture, |
| 28 const SkRect& bounds, | 27 const SkRect& bounds, |
| 29 float xOffset, | 28 float xOffset, |
| 30 float yOffset, | 29 float yOffset, |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 | 384 |
| 386 #ifndef SK_IGNORE_TO_STRING | 385 #ifndef SK_IGNORE_TO_STRING |
| 387 void SkMagnifierImageFilter::toString(SkString* str) const { | 386 void SkMagnifierImageFilter::toString(SkString* str) const { |
| 388 str->appendf("SkMagnifierImageFilter: ("); | 387 str->appendf("SkMagnifierImageFilter: ("); |
| 389 str->appendf("src: (%f,%f,%f,%f) ", | 388 str->appendf("src: (%f,%f,%f,%f) ", |
| 390 fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBotto
m); | 389 fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBotto
m); |
| 391 str->appendf("inset: %f", fInset); | 390 str->appendf("inset: %f", fInset); |
| 392 str->append(")"); | 391 str->append(")"); |
| 393 } | 392 } |
| 394 #endif | 393 #endif |
| OLD | NEW |