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

Side by Side Diff: content/test/layouttest_support.cc

Issue 2216073002: Color: Add ColorCorrectRendering flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decoder_profile
Patch Set: Rebase Created 4 years, 4 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
« no previous file with comments | « content/renderer/render_widget.cc ('k') | third_party/WebKit/Source/core/page/Page.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 SetDeviceScaleFactorForTesting(factor); 345 SetDeviceScaleFactorForTesting(factor);
346 } 346 }
347 347
348 float GetWindowToViewportScale(RenderView* render_view) { 348 float GetWindowToViewportScale(RenderView* render_view) {
349 blink::WebFloatRect rect(0, 0, 1.0f, 0.0); 349 blink::WebFloatRect rect(0, 0, 1.0f, 0.0);
350 static_cast<RenderViewImpl*>(render_view)->convertWindowToViewport(&rect); 350 static_cast<RenderViewImpl*>(render_view)->convertWindowToViewport(&rect);
351 return rect.width; 351 return rect.width;
352 } 352 }
353 353
354 void SetDeviceColorProfile(RenderView* render_view, const std::string& name) { 354 void SetDeviceColorProfile(RenderView* render_view, const std::string& name) {
355 if (name == "reset") {
356 static_cast<RenderViewImpl*>(render_view)
357 ->GetWidget()
358 ->ResetDeviceColorProfileForTesting();
359 return;
360 }
361
362 std::vector<char> color_profile; 355 std::vector<char> color_profile;
363 356
364 struct TestColorProfile { // A color spin profile. 357 struct TestColorProfile { // A color spin profile.
365 char* data() { 358 char* data() {
366 static unsigned char color_profile_data[] = { 359 static unsigned char color_profile_data[] = {
367 0x00,0x00,0x01,0xea,0x54,0x45,0x53,0x54,0x00,0x00,0x00,0x00, 360 0x00,0x00,0x01,0xea,0x54,0x45,0x53,0x54,0x00,0x00,0x00,0x00,
368 0x6d,0x6e,0x74,0x72,0x52,0x47,0x42,0x20,0x58,0x59,0x5a,0x20, 361 0x6d,0x6e,0x74,0x72,0x52,0x47,0x42,0x20,0x58,0x59,0x5a,0x20,
369 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 362 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
370 0x61,0x63,0x73,0x70,0x74,0x65,0x73,0x74,0x00,0x00,0x00,0x00, 363 0x61,0x63,0x73,0x70,0x74,0x65,0x73,0x74,0x00,0x00,0x00,0x00,
371 0x74,0x65,0x73,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 364 0x74,0x65,0x73,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 return result; 563 return result;
571 } 564 }
572 565
573 void SchedulerRunIdleTasks(const base::Closure& callback) { 566 void SchedulerRunIdleTasks(const base::Closure& callback) {
574 blink::scheduler::RendererScheduler* scheduler = 567 blink::scheduler::RendererScheduler* scheduler =
575 content::RenderThreadImpl::current()->GetRendererScheduler(); 568 content::RenderThreadImpl::current()->GetRendererScheduler();
576 blink::scheduler::RunIdleTasksForTesting(scheduler, callback); 569 blink::scheduler::RunIdleTasksForTesting(scheduler, callback);
577 } 570 }
578 571
579 } // namespace content 572 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | third_party/WebKit/Source/core/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698