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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 579843002: Copy layer-hoisting related SkPaints (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Copy layer hoisting related SkPaints Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrRecordReplaceDraw.cpp ('k') | tests/RecordReplaceDrawTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 14643adbdb315aff9393b63f141013f22b3b73c8..25ab12243dfbfeb9e0efc9b842caba05e10dad57 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -170,7 +170,7 @@ SkGpuDevice* SkGpuDevice::Create(GrContext* context, const SkImageInfo& origInfo
SkColorType ct = origInfo.colorType();
SkAlphaType at = origInfo.alphaType();
- // TODO: perhas we can loosen this check now that colortype is more detailed
+ // TODO: perhaps we can loosen this check now that colortype is more detailed
// e.g. can we support both RGBA and BGRA here?
if (kRGB_565_SkColorType == ct) {
at = kOpaque_SkAlphaType; // force this setting
@@ -1860,8 +1860,7 @@ static void convert_layers_to_replacements(const SkTDArray<GrCachedLayer*>& laye
&bm);
layerInfo->fImage = SkImage::NewTexture(bm);
- // TODO: copy this?
- layerInfo->fPaint = layers[i]->paint();
+ layerInfo->fPaint = layers[i]->paint() ? SkNEW_ARGS(SkPaint, (*layers[i]->paint())) : NULL;
layerInfo->fSrcRect = SkIRect::MakeXYWH(layers[i]->rect().fLeft,
layers[i]->rect().fTop,
« no previous file with comments | « src/gpu/GrRecordReplaceDraw.cpp ('k') | tests/RecordReplaceDrawTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698