OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "cc/raster/raster_buffer_provider.h" | 5 #include "cc/raster/raster_buffer_provider.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "cc/raster/raster_source.h" | 10 #include "cc/raster/raster_source.h" |
11 #include "cc/raster/texture_compressor.h" | 11 #include "cc/raster/texture_compressor.h" |
12 #include "cc/resources/platform_color.h" | 12 #include "cc/resources/platform_color.h" |
13 #include "cc/resources/resource_format_utils.h" | 13 #include "cc/resources/resource_format_utils.h" |
14 #include "third_party/skia/include/core/SkCanvas.h" | 14 #include "third_party/skia/include/core/SkCanvas.h" |
15 #include "third_party/skia/include/core/SkSurface.h" | 15 #include "third_party/skia/include/core/SkSurface.h" |
16 | 16 |
17 namespace cc { | 17 namespace cc { |
18 | 18 |
19 RasterBufferProvider::RasterBufferProvider() {} | 19 RasterBufferProvider::RasterBufferProvider() {} |
20 | 20 |
21 RasterBufferProvider::~RasterBufferProvider() {} | 21 RasterBufferProvider::~RasterBufferProvider() {} |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 bool IsSupportedPlaybackToMemoryFormat(ResourceFormat format) { | 25 bool IsSupportedPlaybackToMemoryFormat(ResourceFormat format) { |
26 switch (format) { | 26 switch (format) { |
27 case RGBA_4444: | 27 case RGBA_4444: |
28 case RGBA_8888: | 28 case RGBA_8888: |
29 case BGRA_8888: | 29 case BGRA_8888: |
30 case RGBA_F16: | |
Daniele Castagna
2017/03/30 21:47:10
I'm curious, why was this here in the first place?
ccameron
2017/03/30 23:07:03
I had added it when I added RGBA_F16 as a Resource
Daniele Castagna
2017/03/31 00:25:20
I didn't even know that Skia could do F16, that's
| |
31 case ETC1: | 30 case ETC1: |
32 return true; | 31 return true; |
33 case ALPHA_8: | 32 case ALPHA_8: |
34 case LUMINANCE_8: | 33 case LUMINANCE_8: |
35 case RGB_565: | 34 case RGB_565: |
36 case RED_8: | 35 case RED_8: |
37 case LUMINANCE_F16: | 36 case LUMINANCE_F16: |
37 case RGBA_F16: | |
38 return false; | 38 return false; |
39 } | 39 } |
40 NOTREACHED(); | 40 NOTREACHED(); |
41 return false; | 41 return false; |
42 } | 42 } |
43 | 43 |
44 } // anonymous namespace | 44 } // anonymous namespace |
45 | 45 |
46 // static | 46 // static |
47 void RasterBufferProvider::PlaybackToMemory( | 47 void RasterBufferProvider::PlaybackToMemory( |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
146 case RED_8: | 146 case RED_8: |
147 case LUMINANCE_F16: | 147 case LUMINANCE_F16: |
148 case RGBA_F16: | 148 case RGBA_F16: |
149 return false; | 149 return false; |
150 } | 150 } |
151 NOTREACHED(); | 151 NOTREACHED(); |
152 return false; | 152 return false; |
153 } | 153 } |
154 | 154 |
155 } // namespace cc | 155 } // namespace cc |
OLD | NEW |