| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/renderer/gpu/render_widget_compositor.h" | 5 #include "content/renderer/gpu/render_widget_compositor.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 settings.initialDebugState.showScreenSpaceRects = | 99 settings.initialDebugState.showScreenSpaceRects = |
| 100 cmd->HasSwitch(cc::switches::kShowScreenSpaceRects); | 100 cmd->HasSwitch(cc::switches::kShowScreenSpaceRects); |
| 101 settings.initialDebugState.showReplicaScreenSpaceRects = | 101 settings.initialDebugState.showReplicaScreenSpaceRects = |
| 102 cmd->HasSwitch(cc::switches::kShowReplicaScreenSpaceRects); | 102 cmd->HasSwitch(cc::switches::kShowReplicaScreenSpaceRects); |
| 103 settings.initialDebugState.showOccludingRects = | 103 settings.initialDebugState.showOccludingRects = |
| 104 cmd->HasSwitch(cc::switches::kShowOccludingRects); | 104 cmd->HasSwitch(cc::switches::kShowOccludingRects); |
| 105 settings.initialDebugState.showNonOccludingRects = | 105 settings.initialDebugState.showNonOccludingRects = |
| 106 cmd->HasSwitch(cc::switches::kShowNonOccludingRects); | 106 cmd->HasSwitch(cc::switches::kShowNonOccludingRects); |
| 107 settings.initialDebugState.setRecordRenderingStats( | 107 settings.initialDebugState.setRecordRenderingStats( |
| 108 web_settings.recordRenderingStats); | 108 web_settings.recordRenderingStats); |
| 109 settings.initialDebugState.traceAllRenderedFrames = |
| 110 cmd->HasSwitch(cc::switches::kTraceAllRenderedFrames); |
| 109 | 111 |
| 110 if (cmd->HasSwitch(cc::switches::kSlowDownRasterScaleFactor)) { | 112 if (cmd->HasSwitch(cc::switches::kSlowDownRasterScaleFactor)) { |
| 111 std::string slow_down_scale_str = | 113 std::string slow_down_scale_str = |
| 112 cmd->GetSwitchValueASCII(cc::switches::kSlowDownRasterScaleFactor); | 114 cmd->GetSwitchValueASCII(cc::switches::kSlowDownRasterScaleFactor); |
| 113 int slow_down_scale; | 115 int slow_down_scale; |
| 114 if (base::StringToInt(slow_down_scale_str, &slow_down_scale)) { | 116 if (base::StringToInt(slow_down_scale_str, &slow_down_scale)) { |
| 115 settings.initialDebugState.slowDownRasterScaleFactor = slow_down_scale; | 117 settings.initialDebugState.slowDownRasterScaleFactor = slow_down_scale; |
| 116 } else { | 118 } else { |
| 117 LOG(WARNING) << "Failed to parse the slow down raster scale factor:" << | 119 LOG(WARNING) << "Failed to parse the slow down raster scale factor:" << |
| 118 slow_down_scale_str; | 120 slow_down_scale_str; |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 | 387 |
| 386 client_->createFontAtlas(bitmap, ascii_to_web_rect_table, font_height); | 388 client_->createFontAtlas(bitmap, ascii_to_web_rect_table, font_height); |
| 387 | 389 |
| 388 for (int i = 0; i < 128; ++i) | 390 for (int i = 0; i < 128; ++i) |
| 389 ascii_to_rect_table[i] = ascii_to_web_rect_table[i]; | 391 ascii_to_rect_table[i] = ascii_to_web_rect_table[i]; |
| 390 | 392 |
| 391 return cc::FontAtlas::create(bitmap, ascii_to_rect_table, font_height).Pass(); | 393 return cc::FontAtlas::create(bitmap, ascii_to_rect_table, font_height).Pass(); |
| 392 } | 394 } |
| 393 | 395 |
| 394 } // namespace content | 396 } // namespace content |
| OLD | NEW |