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

Side by Side Diff: skia/public/interfaces/bitmap_skbitmap_struct_traits.cc

Issue 2472543002: remove legacy Skia flags (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "skia/public/interfaces/bitmap_skbitmap_struct_traits.h" 5 #include "skia/public/interfaces/bitmap_skbitmap_struct_traits.h"
6 6
7 namespace mojo { 7 namespace mojo {
8 8
9 namespace { 9 namespace {
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 NOTREACHED(); 45 NOTREACHED();
46 return kUnknown_SkAlphaType; 46 return kUnknown_SkAlphaType;
47 } 47 }
48 48
49 sk_sp<SkColorSpace> MojoProfileTypeToSk(skia::mojom::ColorProfileType type) { 49 sk_sp<SkColorSpace> MojoProfileTypeToSk(skia::mojom::ColorProfileType type) {
50 switch (type) { 50 switch (type) {
51 case skia::mojom::ColorProfileType::LINEAR: 51 case skia::mojom::ColorProfileType::LINEAR:
52 return nullptr; 52 return nullptr;
53 case skia::mojom::ColorProfileType::SRGB: 53 case skia::mojom::ColorProfileType::SRGB:
54 return SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); 54 return SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named);
55 } 55 }
56 NOTREACHED(); 56 NOTREACHED();
57 return nullptr; 57 return nullptr;
58 } 58 }
59 59
60 skia::mojom::ColorType SkColorTypeToMojo(SkColorType type) { 60 skia::mojom::ColorType SkColorTypeToMojo(SkColorType type) {
61 switch (type) { 61 switch (type) {
62 case kUnknown_SkColorType: 62 case kUnknown_SkColorType:
63 return skia::mojom::ColorType::UNKNOWN; 63 return skia::mojom::ColorType::UNKNOWN;
64 case kAlpha_8_SkColorType: 64 case kAlpha_8_SkColorType:
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 208 }
209 209
210 // static 210 // static
211 void StructTraits<skia::mojom::BitmapDataView, SkBitmap>::TearDownContext( 211 void StructTraits<skia::mojom::BitmapDataView, SkBitmap>::TearDownContext(
212 const SkBitmap& b, 212 const SkBitmap& b,
213 void* context) { 213 void* context) {
214 b.unlockPixels(); 214 b.unlockPixels();
215 } 215 }
216 216
217 } // namespace mojo 217 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698