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

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

Issue 1372153006: SkImage doesn't use props, so don't need to store it (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « src/image/SkImage_Generator.cpp ('k') | src/image/SkImage_Raster.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 "SkBitmapCache.h" 8 #include "SkBitmapCache.h"
9 #include "SkImage_Gpu.h" 9 #include "SkImage_Gpu.h"
10 #include "GrCaps.h" 10 #include "GrCaps.h"
11 #include "GrContext.h" 11 #include "GrContext.h"
12 #include "GrDrawContext.h" 12 #include "GrDrawContext.h"
13 #include "GrTextureMaker.h" 13 #include "GrTextureMaker.h"
14 #include "effects/GrYUVtoRGBEffect.h" 14 #include "effects/GrYUVtoRGBEffect.h"
15 #include "SkCanvas.h" 15 #include "SkCanvas.h"
16 #include "SkGpuDevice.h" 16 #include "SkGpuDevice.h"
17 #include "SkGrPriv.h" 17 #include "SkGrPriv.h"
18 #include "SkPixelRef.h" 18 #include "SkPixelRef.h"
19 19
20 SkImage_Gpu::SkImage_Gpu(int w, int h, uint32_t uniqueID, SkAlphaType at, GrText ure* tex, 20 SkImage_Gpu::SkImage_Gpu(int w, int h, uint32_t uniqueID, SkAlphaType at, GrText ure* tex,
21 SkSurface::Budgeted budgeted) 21 SkSurface::Budgeted budgeted)
22 : INHERITED(w, h, uniqueID, nullptr) 22 : INHERITED(w, h, uniqueID)
23 , fTexture(SkRef(tex)) 23 , fTexture(SkRef(tex))
24 , fAlphaType(at) 24 , fAlphaType(at)
25 , fBudgeted(budgeted) 25 , fBudgeted(budgeted)
26 , fAddedRasterVersionToCache(false) 26 , fAddedRasterVersionToCache(false)
27 {} 27 {}
28 28
29 SkImage_Gpu::~SkImage_Gpu() { 29 SkImage_Gpu::~SkImage_Gpu() {
30 if (fAddedRasterVersionToCache.load()) { 30 if (fAddedRasterVersionToCache.load()) {
31 SkNotifyBitmapGenIDIsStale(this->uniqueID()); 31 SkNotifyBitmapGenIDIsStale(this->uniqueID());
32 } 32 }
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 if (!dst) { 324 if (!dst) {
325 return nullptr; 325 return nullptr;
326 } 326 }
327 327
328 const SkIRect srcR = SkIRect::MakeWH(desc.fWidth, desc.fHeight); 328 const SkIRect srcR = SkIRect::MakeWH(desc.fWidth, desc.fHeight);
329 const SkIPoint dstP = SkIPoint::Make(0, 0); 329 const SkIPoint dstP = SkIPoint::Make(0, 0);
330 ctx->copySurface(dst, src, srcR, dstP, GrContext::kFlushWrites_PixelOp); 330 ctx->copySurface(dst, src, srcR, dstP, GrContext::kFlushWrites_PixelOp);
331 return dst; 331 return dst;
332 } 332 }
333 333
OLDNEW
« no previous file with comments | « src/image/SkImage_Generator.cpp ('k') | src/image/SkImage_Raster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698