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

Unified Diff: samplecode/SampleApp.cpp

Issue 2389983002: Refactored SkColorSpace and added in a Lab PCS GM (Closed)
Patch Set: migrated call from SkColorSpace_Base::makeLinearGamma() to SkColorSpace_XYZ::makeLinearGamma() Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « resources/icc_profiles/srgb_lab_pcs.icc ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleApp.cpp
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 4b4621698fdbd08cf62d9e4c8340827679db580e..2194895e0d2c3dc77e65e8b83f69aaecc5e25f51 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -12,7 +12,7 @@
#include "SampleCode.h"
#include "SkAnimTimer.h"
#include "SkCanvas.h"
-#include "SkColorSpace_Base.h"
+#include "SkColorSpace_XYZ.h"
#include "SkCommandLineFlags.h"
#include "SkData.h"
#include "SkDocument.h"
@@ -1676,7 +1676,9 @@ bool SampleWindow::onEvent(const SkEvent& evt) {
}
if (kRGBA_F16_SkColorType == gConfig[selected].fColorType) {
SkASSERT(colorSpace);
- colorSpace = as_CSB(colorSpace)->makeLinearGamma();
+ SkASSERT(SkColorSpace_Base::Type::kXYZ == as_CSB(colorSpace)->type());
+ SkColorSpace_XYZ* csXYZ = static_cast<SkColorSpace_XYZ*>(colorSpace.get());
+ colorSpace = csXYZ->makeLinearGamma();
}
this->setDeviceColorType(gConfig[selected].fColorType, colorSpace);
return true;
« no previous file with comments | « resources/icc_profiles/srgb_lab_pcs.icc ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698