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

Side by Side Diff: src/gpu/SkGr.cpp

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 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/gpu/SkGpuDevice.h ('k') | src/gpu/effects/GrBezierEffect.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 2010 Google Inc. 2 * Copyright 2010 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 "SkGr.h" 8 #include "SkGr.h"
9 9
10 #include "GrDrawTargetCaps.h" 10 #include "GrDrawTargetCaps.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 namespace { 116 namespace {
117 117
118 // When the SkPixelRef genID changes, invalidate a corresponding GrResource desc ribed by key. 118 // When the SkPixelRef genID changes, invalidate a corresponding GrResource desc ribed by key.
119 class GrResourceInvalidator : public SkPixelRef::GenIDChangeListener { 119 class GrResourceInvalidator : public SkPixelRef::GenIDChangeListener {
120 public: 120 public:
121 explicit GrResourceInvalidator(GrResourceKey key) : fKey(key) {} 121 explicit GrResourceInvalidator(GrResourceKey key) : fKey(key) {}
122 private: 122 private:
123 GrResourceKey fKey; 123 GrResourceKey fKey;
124 124
125 virtual void onChange() SK_OVERRIDE { 125 void onChange() SK_OVERRIDE {
126 const GrResourceInvalidatedMessage message = { fKey }; 126 const GrResourceInvalidatedMessage message = { fKey };
127 SkMessageBus<GrResourceInvalidatedMessage>::Post(message); 127 SkMessageBus<GrResourceInvalidatedMessage>::Post(message);
128 } 128 }
129 }; 129 };
130 130
131 } // namespace 131 } // namespace
132 132
133 static void add_genID_listener(GrResourceKey key, SkPixelRef* pixelRef) { 133 static void add_genID_listener(GrResourceKey key, SkPixelRef* pixelRef) {
134 SkASSERT(pixelRef); 134 SkASSERT(pixelRef);
135 pixelRef->addGenIDChangeListener(SkNEW_ARGS(GrResourceInvalidator, (key))); 135 pixelRef->addGenIDChangeListener(SkNEW_ARGS(GrResourceInvalidator, (key)));
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 if (shader->asFragmentProcessor(context, skPaint, viewM, NULL, &paintCol or, &fp) && fp) { 581 if (shader->asFragmentProcessor(context, skPaint, viewM, NULL, &paintCol or, &fp) && fp) {
582 grPaint->addColorProcessor(fp)->unref(); 582 grPaint->addColorProcessor(fp)->unref();
583 constantColor = false; 583 constantColor = false;
584 } 584 }
585 } 585 }
586 586
587 // The grcolor is automatically set when calling asFragmentProcessor. 587 // The grcolor is automatically set when calling asFragmentProcessor.
588 // If the shader can be seen as an effect it returns true and adds its effec t to the grpaint. 588 // If the shader can be seen as an effect it returns true and adds its effec t to the grpaint.
589 SkPaint2GrPaintNoShader(context, skPaint, paintColor, constantColor, grPaint ); 589 SkPaint2GrPaintNoShader(context, skPaint, paintColor, constantColor, grPaint );
590 } 590 }
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice.h ('k') | src/gpu/effects/GrBezierEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698