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

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

Issue 1417553002: Add override (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 2 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 | « no previous file | 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 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 8
9 #include "SkGr.h" 9 #include "SkGr.h"
10 10
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 { 284 {
285 if (!bitmap.isVolatile()) { 285 if (!bitmap.isVolatile()) {
286 SkIPoint origin = bitmap.pixelRefOrigin(); 286 SkIPoint origin = bitmap.pixelRefOrigin();
287 SkIRect subset = SkIRect::MakeXYWH(origin.fX, origin.fY, bitmap.widt h(), 287 SkIRect subset = SkIRect::MakeXYWH(origin.fX, origin.fY, bitmap.widt h(),
288 bitmap.height()); 288 bitmap.height());
289 GrMakeKeyFromImageID(&fOriginalKey, bitmap.pixelRef()->getGeneration ID(), subset); 289 GrMakeKeyFromImageID(&fOriginalKey, bitmap.pixelRef()->getGeneration ID(), subset);
290 } 290 }
291 } 291 }
292 292
293 protected: 293 protected:
294 GrTexture* refOriginalTexture(GrContext* ctx) { 294 GrTexture* refOriginalTexture(GrContext* ctx) override {
295 GrTexture* tex = fBitmap.getTexture(); 295 GrTexture* tex = fBitmap.getTexture();
296 if (tex) { 296 if (tex) {
297 return SkRef(tex); 297 return SkRef(tex);
298 } 298 }
299 299
300 if (fOriginalKey.isValid()) { 300 if (fOriginalKey.isValid()) {
301 tex = ctx->textureProvider()->findAndRefTextureByUniqueKey(fOriginal Key); 301 tex = ctx->textureProvider()->findAndRefTextureByUniqueKey(fOriginal Key);
302 if (tex) { 302 if (tex) {
303 return tex; 303 return tex;
304 } 304 }
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 SkErrorInternals::SetError( kInvalidPaint_SkError, 666 SkErrorInternals::SetError( kInvalidPaint_SkError,
667 "Sorry, I don't understand the filtering " 667 "Sorry, I don't understand the filtering "
668 "mode you asked for. Falling back to " 668 "mode you asked for. Falling back to "
669 "MIPMaps."); 669 "MIPMaps.");
670 textureFilterMode = GrTextureParams::kMipMap_FilterMode; 670 textureFilterMode = GrTextureParams::kMipMap_FilterMode;
671 break; 671 break;
672 672
673 } 673 }
674 return textureFilterMode; 674 return textureFilterMode;
675 } 675 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698