| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/public/test/layouttest_support.h" | 5 #include "content/public/test/layouttest_support.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "content/browser/renderer_host/render_widget_host_impl.h" | 9 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 10 #include "content/common/gpu/image_transport_surface.h" | 10 #include "content/common/gpu/image_transport_surface.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 0x00,0x00,0x26,0x31,0x00,0x00,0x10,0x2f,0x00,0x00,0xbe,0x9b, | 190 0x00,0x00,0x26,0x31,0x00,0x00,0x10,0x2f,0x00,0x00,0xbe,0x9b, |
| 191 0x58,0x59,0x5a,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x18, | 191 0x58,0x59,0x5a,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x18, |
| 192 0x00,0x00,0x4f,0xa5,0x00,0x00,0x04,0xfc,0x63,0x75,0x72,0x76, | 192 0x00,0x00,0x4f,0xa5,0x00,0x00,0x04,0xfc,0x63,0x75,0x72,0x76, |
| 193 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x33 | 193 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x33 |
| 194 }; | 194 }; |
| 195 | 195 |
| 196 return reinterpret_cast<char*>(color_profile_data); | 196 return reinterpret_cast<char*>(color_profile_data); |
| 197 } | 197 } |
| 198 | 198 |
| 199 size_t size() { | 199 size_t size() { |
| 200 const size_t kColorProfileSizeInBytes = 490u; | 200 const size_t kTestColorProfileSizeInBytes = 490u; |
| 201 return kColorProfileSizeInBytes; | 201 return kTestColorProfileSizeInBytes; |
| 202 } | 202 } |
| 203 }; | 203 }; |
| 204 | 204 |
| 205 struct AdobeRGBColorProfile { |
| 206 char* data() { |
| 207 static unsigned char color_profile_data[] = { |
| 208 0x00,0x00,0x02,0x30,0x41,0x44,0x42,0x45,0x02,0x10,0x00,0x00, |
| 209 0x6d,0x6e,0x74,0x72,0x52,0x47,0x42,0x20,0x58,0x59,0x5a,0x20, |
| 210 0x07,0xd0,0x00,0x08,0x00,0x0b,0x00,0x13,0x00,0x33,0x00,0x3b, |
| 211 0x61,0x63,0x73,0x70,0x41,0x50,0x50,0x4c,0x00,0x00,0x00,0x00, |
| 212 0x6e,0x6f,0x6e,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 213 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf6,0xd6, |
| 214 0x00,0x01,0x00,0x00,0x00,0x00,0xd3,0x2d,0x41,0x44,0x42,0x45, |
| 215 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 216 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 217 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 218 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a, |
| 219 0x63,0x70,0x72,0x74,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x32, |
| 220 0x64,0x65,0x73,0x63,0x00,0x00,0x01,0x30,0x00,0x00,0x00,0x6b, |
| 221 0x77,0x74,0x70,0x74,0x00,0x00,0x01,0x9c,0x00,0x00,0x00,0x14, |
| 222 0x62,0x6b,0x70,0x74,0x00,0x00,0x01,0xb0,0x00,0x00,0x00,0x14, |
| 223 0x72,0x54,0x52,0x43,0x00,0x00,0x01,0xc4,0x00,0x00,0x00,0x0e, |
| 224 0x67,0x54,0x52,0x43,0x00,0x00,0x01,0xd4,0x00,0x00,0x00,0x0e, |
| 225 0x62,0x54,0x52,0x43,0x00,0x00,0x01,0xe4,0x00,0x00,0x00,0x0e, |
| 226 0x72,0x58,0x59,0x5a,0x00,0x00,0x01,0xf4,0x00,0x00,0x00,0x14, |
| 227 0x67,0x58,0x59,0x5a,0x00,0x00,0x02,0x08,0x00,0x00,0x00,0x14, |
| 228 0x62,0x58,0x59,0x5a,0x00,0x00,0x02,0x1c,0x00,0x00,0x00,0x14, |
| 229 0x74,0x65,0x78,0x74,0x00,0x00,0x00,0x00,0x43,0x6f,0x70,0x79, |
| 230 0x72,0x69,0x67,0x68,0x74,0x20,0x32,0x30,0x30,0x30,0x20,0x41, |
| 231 0x64,0x6f,0x62,0x65,0x20,0x53,0x79,0x73,0x74,0x65,0x6d,0x73, |
| 232 0x20,0x49,0x6e,0x63,0x6f,0x72,0x70,0x6f,0x72,0x61,0x74,0x65, |
| 233 0x64,0x00,0x00,0x00,0x64,0x65,0x73,0x63,0x00,0x00,0x00,0x00, |
| 234 0x00,0x00,0x00,0x11,0x41,0x64,0x6f,0x62,0x65,0x20,0x52,0x47, |
| 235 0x42,0x20,0x28,0x31,0x39,0x39,0x38,0x29,0x00,0x00,0x00,0x00, |
| 236 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 237 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 238 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 239 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 240 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 241 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 242 0x00,0x00,0x00,0x00,0x58,0x59,0x5a,0x20,0x00,0x00,0x00,0x00, |
| 243 0x00,0x00,0xf3,0x51,0x00,0x01,0x00,0x00,0x00,0x01,0x16,0xcc, |
| 244 0x58,0x59,0x5a,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 245 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x63,0x75,0x72,0x76, |
| 246 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x33,0x00,0x00, |
| 247 0x63,0x75,0x72,0x76,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, |
| 248 0x02,0x33,0x00,0x00,0x63,0x75,0x72,0x76,0x00,0x00,0x00,0x00, |
| 249 0x00,0x00,0x00,0x01,0x02,0x33,0x00,0x00,0x58,0x59,0x5a,0x20, |
| 250 0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x18,0x00,0x00,0x4f,0xa5, |
| 251 0x00,0x00,0x04,0xfc,0x58,0x59,0x5a,0x20,0x00,0x00,0x00,0x00, |
| 252 0x00,0x00,0x34,0x8d,0x00,0x00,0xa0,0x2c,0x00,0x00,0x0f,0x95, |
| 253 0x58,0x59,0x5a,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x26,0x31, |
| 254 0x00,0x00,0x10,0x2f,0x00,0x00,0xbe,0x9c |
| 255 }; |
| 256 |
| 257 return reinterpret_cast<char*>(color_profile_data); |
| 258 } |
| 259 |
| 260 size_t size() { |
| 261 const size_t kAdobeRGBColorProfileSizeInBytes = 560u; |
| 262 return kAdobeRGBColorProfileSizeInBytes; |
| 263 } |
| 264 }; |
| 265 |
| 205 if (name == "sRGB") { | 266 if (name == "sRGB") { |
| 206 color_profile.assign(name.data(), name.data() + name.size()); | 267 color_profile.assign(name.data(), name.data() + name.size()); |
| 207 } else if (name == "test") { | 268 } else if (name == "test") { |
| 208 TestColorProfile test; | 269 TestColorProfile test; |
| 209 color_profile.assign(test.data(), test.data() + test.size()); | 270 color_profile.assign(test.data(), test.data() + test.size()); |
| 271 } else if (name == "adobeRGB") { |
| 272 AdobeRGBColorProfile test; |
| 273 color_profile.assign(test.data(), test.data() + test.size()); |
| 210 } | 274 } |
| 211 | 275 |
| 212 static_cast<RenderViewImpl*>(render_view)-> | 276 static_cast<RenderViewImpl*>(render_view)-> |
| 213 SetDeviceColorProfileForTesting(color_profile); | 277 SetDeviceColorProfileForTesting(color_profile); |
| 214 } | 278 } |
| 215 | 279 |
| 216 void UseSynchronousResizeMode(RenderView* render_view, bool enable) { | 280 void UseSynchronousResizeMode(RenderView* render_view, bool enable) { |
| 217 static_cast<RenderViewImpl*>(render_view)-> | 281 static_cast<RenderViewImpl*>(render_view)-> |
| 218 UseSynchronousResizeModeForTesting(enable); | 282 UseSynchronousResizeModeForTesting(enable); |
| 219 } | 283 } |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 } | 354 } |
| 291 result.append("===============================================\n"); | 355 result.append("===============================================\n"); |
| 292 return result; | 356 return result; |
| 293 } | 357 } |
| 294 | 358 |
| 295 blink::WebLayer* InstantiateWebLayer(scoped_refptr<cc::TextureLayer> layer) { | 359 blink::WebLayer* InstantiateWebLayer(scoped_refptr<cc::TextureLayer> layer) { |
| 296 return new WebLayerImpl(layer); | 360 return new WebLayerImpl(layer); |
| 297 } | 361 } |
| 298 | 362 |
| 299 } // namespace content | 363 } // namespace content |
| OLD | NEW |