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

Side by Side Diff: src/image/SkImage_Gpu.cpp

Issue 1744243002: Remove internal calls to SkImage::getTexture (Closed) Base URL: https://skia.googlesource.com/skia.git@budalias
Patch Set: Add getTexture() back to SkImage :( Created 4 years, 9 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/image/SkImage_Gpu.h ('k') | src/image/SkSurface_Gpu.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 #include "GrCaps.h" 8 #include "GrCaps.h"
9 #include "GrContext.h" 9 #include "GrContext.h"
10 #include "GrDrawContext.h" 10 #include "GrDrawContext.h"
(...skipping 20 matching lines...) Expand all
31 SkASSERT(tex->height() == h); 31 SkASSERT(tex->height() == h);
32 } 32 }
33 33
34 SkImage_Gpu::~SkImage_Gpu() { 34 SkImage_Gpu::~SkImage_Gpu() {
35 if (fAddedRasterVersionToCache.load()) { 35 if (fAddedRasterVersionToCache.load()) {
36 SkNotifyBitmapGenIDIsStale(this->uniqueID()); 36 SkNotifyBitmapGenIDIsStale(this->uniqueID());
37 } 37 }
38 } 38 }
39 39
40 extern void SkTextureImageApplyBudgetedDecision(SkImage* image) { 40 extern void SkTextureImageApplyBudgetedDecision(SkImage* image) {
41 if (as_IB(image)->getTexture()) { 41 if (as_IB(image)->peekTexture()) {
42 ((SkImage_Gpu*)image)->applyBudgetDecision(); 42 ((SkImage_Gpu*)image)->applyBudgetDecision();
43 } 43 }
44 } 44 }
45 45
46 static SkImageInfo make_info(int w, int h, bool isOpaque) { 46 static SkImageInfo make_info(int w, int h, bool isOpaque) {
47 return SkImageInfo::MakeN32(w, h, isOpaque ? kOpaque_SkAlphaType : kPremul_S kAlphaType); 47 return SkImageInfo::MakeN32(w, h, isOpaque ? kOpaque_SkAlphaType : kPremul_S kAlphaType);
48 } 48 }
49 49
50 bool SkImage_Gpu::getROPixels(SkBitmap* dst, CachingHint chint) const { 50 bool SkImage_Gpu::getROPixels(SkBitmap* dst, CachingHint chint) const {
51 if (SkBitmapCache::Find(this->uniqueID(), dst)) { 51 if (SkBitmapCache::Find(this->uniqueID(), dst)) {
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 return nullptr; 321 return nullptr;
322 } 322 }
323 323
324 const SkIRect srcR = SkIRect::MakeWH(desc.fWidth, desc.fHeight); 324 const SkIRect srcR = SkIRect::MakeWH(desc.fWidth, desc.fHeight);
325 const SkIPoint dstP = SkIPoint::Make(0, 0); 325 const SkIPoint dstP = SkIPoint::Make(0, 0);
326 ctx->copySurface(dst, src, srcR, dstP); 326 ctx->copySurface(dst, src, srcR, dstP);
327 ctx->flushSurfaceWrites(dst); 327 ctx->flushSurfaceWrites(dst);
328 return dst; 328 return dst;
329 } 329 }
330 330
OLDNEW
« no previous file with comments | « src/image/SkImage_Gpu.h ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698