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

Side by Side Diff: src/effects/gradients/SkGradientShaderPriv.h

Issue 699943003: Move GrInvariantOutput out of GrProcessor and into its own class. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Cleanup Created 6 years, 1 month 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/gradients/SkGradientShader.cpp ('k') | src/gpu/GrAAConvexPathRenderer.cpp » ('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 2012 Google Inc. 2 * Copyright 2012 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 #ifndef SkGradientShaderPriv_DEFINED 8 #ifndef SkGradientShaderPriv_DEFINED
9 #define SkGradientShaderPriv_DEFINED 9 #define SkGradientShaderPriv_DEFINED
10 10
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 /////////////////////////////////////////////////////////////////////////////// 296 ///////////////////////////////////////////////////////////////////////////////
297 297
298 #if SK_SUPPORT_GPU 298 #if SK_SUPPORT_GPU
299 299
300 #include "GrCoordTransform.h" 300 #include "GrCoordTransform.h"
301 #include "GrFragmentProcessor.h" 301 #include "GrFragmentProcessor.h"
302 #include "gl/GrGLProcessor.h" 302 #include "gl/GrGLProcessor.h"
303 303
304 class GrFragmentStage; 304 class GrFragmentStage;
305 class GrBackendProcessorFactory; 305 class GrBackendProcessorFactory;
306 class GrInvariantOutput;
306 307
307 /* 308 /*
308 * The interpretation of the texture matrix depends on the sample mode. The 309 * The interpretation of the texture matrix depends on the sample mode. The
309 * texture matrix is applied both when the texture coordinates are explicit 310 * texture matrix is applied both when the texture coordinates are explicit
310 * and when vertex positions are used as texture coordinates. In the latter 311 * and when vertex positions are used as texture coordinates. In the latter
311 * case the texture matrix is applied to the pre-view-matrix position 312 * case the texture matrix is applied to the pre-view-matrix position
312 * values. 313 * values.
313 * 314 *
314 * Normal SampleMode 315 * Normal SampleMode
315 * The post-matrix texture coordinates are in normalize space with (0,0) at 316 * The post-matrix texture coordinates are in normalize space with (0,0) at
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 passed to the gradient factory rather than the array. 369 passed to the gradient factory rather than the array.
369 */ 370 */
370 static const int kMaxRandomGradientColors = 4; 371 static const int kMaxRandomGradientColors = 4;
371 static int RandomGradientParams(SkRandom* r, 372 static int RandomGradientParams(SkRandom* r,
372 SkColor colors[kMaxRandomGradientColors], 373 SkColor colors[kMaxRandomGradientColors],
373 SkScalar** stops, 374 SkScalar** stops,
374 SkShader::TileMode* tm); 375 SkShader::TileMode* tm);
375 376
376 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; 377 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE;
377 378
378 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR IDE; 379 virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVE RRIDE;
379 380
380 const GrCoordTransform& getCoordTransform() const { return fCoordTransform; } 381 const GrCoordTransform& getCoordTransform() const { return fCoordTransform; }
381 382
382 private: 383 private:
383 static const GrCoordSet kCoordSet = kLocal_GrCoordSet; 384 static const GrCoordSet kCoordSet = kLocal_GrCoordSet;
384 385
385 GrCoordTransform fCoordTransform; 386 GrCoordTransform fCoordTransform;
386 GrTextureAccess fTextureAccess; 387 GrTextureAccess fTextureAccess;
387 SkScalar fYCoord; 388 SkScalar fYCoord;
388 GrTextureStripAtlas* fAtlas; 389 GrTextureStripAtlas* fAtlas;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 GrGLProgramDataManager::UniformHandle fColorStartUni; 468 GrGLProgramDataManager::UniformHandle fColorStartUni;
468 GrGLProgramDataManager::UniformHandle fColorMidUni; 469 GrGLProgramDataManager::UniformHandle fColorMidUni;
469 GrGLProgramDataManager::UniformHandle fColorEndUni; 470 GrGLProgramDataManager::UniformHandle fColorEndUni;
470 471
471 typedef GrGLFragmentProcessor INHERITED; 472 typedef GrGLFragmentProcessor INHERITED;
472 }; 473 };
473 474
474 #endif 475 #endif
475 476
476 #endif 477 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698