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

Unified Diff: include/device/xps/SkXPSDevice.h

Issue 494423002: Add testing flag for XPS for deterministic ids. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | src/device/xps/SkXPSDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/device/xps/SkXPSDevice.h
diff --git a/include/device/xps/SkXPSDevice.h b/include/device/xps/SkXPSDevice.h
index 5170957a596c95491d40b8626b5c840c3bb6fc46..2aa7ba8f0d5bf6a038303e9468bdfadbdddffa9f 100644
--- a/include/device/xps/SkXPSDevice.h
+++ b/include/device/xps/SkXPSDevice.h
@@ -26,6 +26,8 @@
#include "SkTScopedComPtr.h"
#include "SkTypeface.h"
+//#define SK_XPS_USE_DETERMINISTIC_IDS
+
/** \class SkXPSDevice
The drawing context for the XPS backend.
@@ -172,6 +174,18 @@ private:
SkTArray<TypefaceUse, true> fTypefaces;
+ /** Creates a GUID based id and places it into buffer.
+ buffer should have space for at least GUID_ID_LEN wide characters.
+ The string will always be wchar null terminated.
+ XXXXXXXXsXXXXsXXXXsXXXXsXXXXXXXXXXXX0
+ The string may begin with a digit,
+ and so may not be suitable as a bare resource key.
+ */
+ HRESULT createId(wchar_t* buffer, size_t bufferSize, wchar_t sep = '-');
+#ifdef SK_XPS_USE_DETERMINISTIC_IDS
+ decltype(GUID::Data1) fNextId = 0;
mtklein 2014/08/22 18:23:34 Would prefer DWORD, whatever explicitly.
+#endif
+
HRESULT initXpsDocumentWriter(IXpsOMImageResource* image);
HRESULT createXpsPage(
« no previous file with comments | « no previous file | src/device/xps/SkXPSDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698