OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
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 "SkTableColorFilter.h" | 8 #include "SkTableColorFilter.h" |
9 | 9 |
10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 combine_tables(concatB, tableB, innerBM.getAddr8(0, 3)); | 327 combine_tables(concatB, tableB, innerBM.getAddr8(0, 3)); |
328 | 328 |
329 return SkTableColorFilter::MakeARGB(concatA, concatR, concatG, concatB); | 329 return SkTableColorFilter::MakeARGB(concatA, concatR, concatG, concatB); |
330 } | 330 } |
331 | 331 |
332 #if SK_SUPPORT_GPU | 332 #if SK_SUPPORT_GPU |
333 | 333 |
334 #include "GrContext.h" | 334 #include "GrContext.h" |
335 #include "GrFragmentProcessor.h" | 335 #include "GrFragmentProcessor.h" |
336 #include "GrInvariantOutput.h" | 336 #include "GrInvariantOutput.h" |
| 337 #include "GrTextureStripAtlas.h" |
337 #include "SkGr.h" | 338 #include "SkGr.h" |
338 #include "effects/GrTextureStripAtlas.h" | |
339 #include "glsl/GrGLSLFragmentProcessor.h" | 339 #include "glsl/GrGLSLFragmentProcessor.h" |
340 #include "glsl/GrGLSLFragmentShaderBuilder.h" | 340 #include "glsl/GrGLSLFragmentShaderBuilder.h" |
341 #include "glsl/GrGLSLProgramDataManager.h" | 341 #include "glsl/GrGLSLProgramDataManager.h" |
342 #include "glsl/GrGLSLUniformHandler.h" | 342 #include "glsl/GrGLSLUniformHandler.h" |
343 | 343 |
344 class ColorTableEffect : public GrFragmentProcessor { | 344 class ColorTableEffect : public GrFragmentProcessor { |
345 public: | 345 public: |
346 static sk_sp<GrFragmentProcessor> Make(GrContext* context, SkBitmap bitmap,
unsigned flags); | 346 static sk_sp<GrFragmentProcessor> Make(GrContext* context, SkBitmap bitmap,
unsigned flags); |
347 | 347 |
348 virtual ~ColorTableEffect(); | 348 virtual ~ColorTableEffect(); |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 sk_sp<SkColorFilter> SkTableColorFilter::MakeARGB(const uint8_t tableA[256], | 595 sk_sp<SkColorFilter> SkTableColorFilter::MakeARGB(const uint8_t tableA[256], |
596 const uint8_t tableR[256], | 596 const uint8_t tableR[256], |
597 const uint8_t tableG[256], | 597 const uint8_t tableG[256], |
598 const uint8_t tableB[256]) { | 598 const uint8_t tableB[256]) { |
599 return sk_make_sp<SkTable_ColorFilter>(tableA, tableR, tableG, tableB); | 599 return sk_make_sp<SkTable_ColorFilter>(tableA, tableR, tableG, tableB); |
600 } | 600 } |
601 | 601 |
602 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkTableColorFilter) | 602 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkTableColorFilter) |
603 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTable_ColorFilter) | 603 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTable_ColorFilter) |
604 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 604 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
OLD | NEW |