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

Side by Side Diff: cc/resources/resource_format.cc

Issue 1351283003: Allow task pools to reason about transparency. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
OLDNEW
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/resources/resource_format.h" 5 #include "cc/resources/resource_format.h"
6 6
7 #include "third_party/khronos/GLES2/gl2.h" 7 #include "third_party/khronos/GLES2/gl2.h"
8 #include "third_party/khronos/GLES2/gl2ext.h" 8 #include "third_party/khronos/GLES2/gl2ext.h"
9 9
10 namespace cc { 10 namespace cc {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 case LUMINANCE_8: 99 case LUMINANCE_8:
100 case RGB_565: 100 case RGB_565:
101 case ETC1: 101 case ETC1:
102 case RED_8: 102 case RED_8:
103 break; 103 break;
104 } 104 }
105 NOTREACHED(); 105 NOTREACHED();
106 return gfx::BufferFormat::RGBA_8888; 106 return gfx::BufferFormat::RGBA_8888;
107 } 107 }
108 108
109 ResourceFormat BufferFormatToResourceFormat(gfx::BufferFormat format) {
110 switch (format) {
111 case gfx::BufferFormat::RGBA_8888:
112 return RGBA_8888;
113 case gfx::BufferFormat::BGRA_8888:
114 return BGRA_8888;
115 case gfx::BufferFormat::RGBA_4444:
116 return RGBA_4444;
117 case gfx::BufferFormat::ETC1:
118 return ETC1;
119 case gfx::BufferFormat::ATC:
120 case gfx::BufferFormat::ATCIA:
121 case gfx::BufferFormat::DXT1:
122 case gfx::BufferFormat::DXT5:
123 case gfx::BufferFormat::R_8:
124 case gfx::BufferFormat::BGRX_8888:
125 case gfx::BufferFormat::YUV_420:
126 case gfx::BufferFormat::YUV_420_BIPLANAR:
127 case gfx::BufferFormat::UYVY_422:
128 break;
129 }
130 NOTREACHED();
131 return RGBA_8888;
132 }
133
109 } // namespace cc 134 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698