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

Unified Diff: src/core/SkBitmap.cpp

Issue 2181073003: Start measuring f16 and srgb speed. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: support f16 in SkBitmap::getAddr() Created 4 years, 5 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 | tools/nanobench_flags.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmap.cpp
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index a803c782274a2690af2bcdfa9f8393e4a1c7c440..e73217ea50f4eab94e16f1baedebc021f87e5f3e 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -535,6 +535,9 @@ void* SkBitmap::getAddr(int x, int y) const {
if (base) {
base += y * this->rowBytes();
switch (this->colorType()) {
+ case kRGBA_F16_SkColorType:
+ base += x << 3;
+ break;
case kRGBA_8888_SkColorType:
case kBGRA_8888_SkColorType:
base += x << 2;
« no previous file with comments | « no previous file | tools/nanobench_flags.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698