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

Side by Side Diff: src/gpu/effects/GrYUVtoRGBEffect.cpp

Issue 371103003: Remove GrEffect::CreateEffectRef and GrEffect::AutoEffectRef. (Closed) Base URL: https://skia.googlesource.com/skia.git@no_ref2
Patch Set: Address comments and update for new YUV effect Created 6 years, 5 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/gpu/effects/GrTextureDomain.cpp ('k') | no next file » | 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 2014 Google Inc. 2 * Copyright 2014 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 "GrYUVtoRGBEffect.h" 8 #include "GrYUVtoRGBEffect.h"
9 9
10 #include "GrCoordTransform.h" 10 #include "GrCoordTransform.h"
11 #include "GrEffect.h" 11 #include "GrEffect.h"
12 #include "gl/GrGLEffect.h" 12 #include "gl/GrGLEffect.h"
13 #include "GrTBackendEffectFactory.h" 13 #include "GrTBackendEffectFactory.h"
14 14
15 namespace { 15 namespace {
16 16
17 class YUVtoRGBEffect : public GrEffect { 17 class YUVtoRGBEffect : public GrEffect {
18 public: 18 public:
19 static GrEffect* Create(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vTexture) { 19 static GrEffect* Create(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vTexture) {
20 AutoEffectUnref effect(SkNEW_ARGS(YUVtoRGBEffect, (yTexture, uTexture, v Texture))); 20 return SkNEW_ARGS(YUVtoRGBEffect, (yTexture, uTexture, vTexture));
21 return CreateEffectRef(effect);
22 } 21 }
23 22
24 static const char* Name() { return "YUV to RGB"; } 23 static const char* Name() { return "YUV to RGB"; }
25 24
26 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE { 25 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE {
27 return GrTBackendEffectFactory<YUVtoRGBEffect>::getInstance(); 26 return GrTBackendEffectFactory<YUVtoRGBEffect>::getInstance();
28 } 27 }
29 28
30 virtual void getConstantColorComponents(GrColor* color, 29 virtual void getConstantColorComponents(GrColor* color,
31 uint32_t* validFlags) const SK_OVERR IDE { 30 uint32_t* validFlags) const SK_OVERR IDE {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 98
100 } 99 }
101 100
102 ////////////////////////////////////////////////////////////////////////////// 101 //////////////////////////////////////////////////////////////////////////////
103 102
104 GrEffectRef* GrYUVtoRGBEffect::Create(GrTexture* yTexture, 103 GrEffectRef* GrYUVtoRGBEffect::Create(GrTexture* yTexture,
105 GrTexture* uTexture, 104 GrTexture* uTexture,
106 GrTexture* vTexture) { 105 GrTexture* vTexture) {
107 return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture); 106 return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture);
108 } 107 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrTextureDomain.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698