Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/effects/SkTableColorFilter.cpp

Issue 1569393002: Revert of Add a class representing texture swizzle. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/effects/SkColorCubeFilter.cpp ('k') | src/gpu/GrSwizzle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 texture.reset(GrRefCachedBitmapTexture(context, bitmap, GrTextureParams: :ClampNoFilter())); 480 texture.reset(GrRefCachedBitmapTexture(context, bitmap, GrTextureParams: :ClampNoFilter()));
481 } else { 481 } else {
482 texture.reset(SkRef(atlas->getTexture())); 482 texture.reset(SkRef(atlas->getTexture()));
483 } 483 }
484 484
485 return new ColorTableEffect(texture, atlas, row, flags); 485 return new ColorTableEffect(texture, atlas, row, flags);
486 } 486 }
487 487
488 ColorTableEffect::ColorTableEffect(GrTexture* texture, GrTextureStripAtlas* atla s, int row, 488 ColorTableEffect::ColorTableEffect(GrTexture* texture, GrTextureStripAtlas* atla s, int row,
489 unsigned flags) 489 unsigned flags)
490 : fTextureAccess(texture) 490 : fTextureAccess(texture, "a")
491 , fFlags(flags) 491 , fFlags(flags)
492 , fAtlas(atlas) 492 , fAtlas(atlas)
493 , fRow(row) { 493 , fRow(row) {
494 this->initClassID<ColorTableEffect>(); 494 this->initClassID<ColorTableEffect>();
495 this->addTextureAccess(&fTextureAccess); 495 this->addTextureAccess(&fTextureAccess);
496 } 496 }
497 497
498 ColorTableEffect::~ColorTableEffect() { 498 ColorTableEffect::~ColorTableEffect() {
499 if (fAtlas) { 499 if (fAtlas) {
500 fAtlas->unlockRow(fRow); 500 fAtlas->unlockRow(fRow);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 SkColorFilter* SkTableColorFilter::CreateARGB(const uint8_t tableA[256], 598 SkColorFilter* SkTableColorFilter::CreateARGB(const uint8_t tableA[256],
599 const uint8_t tableR[256], 599 const uint8_t tableR[256],
600 const uint8_t tableG[256], 600 const uint8_t tableG[256],
601 const uint8_t tableB[256]) { 601 const uint8_t tableB[256]) {
602 return new SkTable_ColorFilter(tableA, tableR, tableG, tableB); 602 return new SkTable_ColorFilter(tableA, tableR, tableG, tableB);
603 } 603 }
604 604
605 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkTableColorFilter) 605 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkTableColorFilter)
606 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTable_ColorFilter) 606 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTable_ColorFilter)
607 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 607 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/effects/SkColorCubeFilter.cpp ('k') | src/gpu/GrSwizzle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698