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

Unified Diff: src/gpu/SkGrPixelRef.cpp

Issue 1177843007: Invalidate GrTexture mipmap on content change notification (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: typo fix Created 5 years, 6 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/core/SkPixelRef.cpp ('k') | tests/GrTextureMipMapInvalidationTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGrPixelRef.cpp
diff --git a/src/gpu/SkGrPixelRef.cpp b/src/gpu/SkGrPixelRef.cpp
index 3fa049166b7af588cbf8ec9a04d3b0e718d50ee4..ad6e24aa6f4e7643df779a376728fcc08de63b65 100644
--- a/src/gpu/SkGrPixelRef.cpp
+++ b/src/gpu/SkGrPixelRef.cpp
@@ -12,6 +12,7 @@
#include "GrContext.h"
#include "GrTexture.h"
+#include "GrTexturePriv.h"
#include "SkBitmapCache.h"
#include "SkGr.h"
#include "SkRect.h"
@@ -126,6 +127,13 @@ GrTexture* SkGrPixelRef::getTexture() {
return NULL;
}
+void SkGrPixelRef::onNotifyPixelsChanged() {
+ GrTexture* texture = this->getTexture();
+ if (texture) {
+ texture->texturePriv().dirtyMipMaps(true);
+ }
+}
+
SkPixelRef* SkGrPixelRef::deepCopy(SkColorType dstCT, SkColorProfileType dstPT,
const SkIRect* subset) {
if (NULL == fSurface) {
« no previous file with comments | « src/core/SkPixelRef.cpp ('k') | tests/GrTextureMipMapInvalidationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698