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

Unified Diff: Source/core/platform/graphics/skia/PlatformContextSkia.cpp

Issue 14160005: Track the region where text is painted. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: implemented TextRun wrapper Created 7 years, 8 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
Index: Source/core/platform/graphics/skia/PlatformContextSkia.cpp
diff --git a/Source/core/platform/graphics/skia/PlatformContextSkia.cpp b/Source/core/platform/graphics/skia/PlatformContextSkia.cpp
index f0fe9b1fe42947f523aa98ff1be4ace68c89f41d..347372fe5c37ca683040f8ef4246bf12cecf8b3f 100644
--- a/Source/core/platform/graphics/skia/PlatformContextSkia.cpp
+++ b/Source/core/platform/graphics/skia/PlatformContextSkia.cpp
@@ -68,6 +68,7 @@ PlatformContextSkia::PlatformContextSkia(SkCanvas* canvas)
: m_canvas(canvas)
, m_deferredSaveFlags(0)
, m_trackOpaqueRegion(false)
+ , m_trackTextRegion(false)
, m_printing(false)
, m_accelerated(false)
, m_drawingToImageBuffer(false)
@@ -493,4 +494,12 @@ bool PlatformContextSkia::couldUseLCDRenderedText()
return m_gc->shouldSmoothFonts();
}
+void PlatformContextSkia::didDrawTextInRect(const SkRect& textRect)
+{
+ if (m_trackTextRegion) {
+ TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion");
+ m_textRegion.join(textRect);
+ }
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698