| 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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1907 // code paths on Windows and Linux didn't yet have multisampling support. | 1907 // code paths on Windows and Linux didn't yet have multisampling support. |
| 1908 // Mac OS X essentially always behaves as though it's rendering offscreen. | 1908 // Mac OS X essentially always behaves as though it's rendering offscreen. |
| 1909 // Multisampling has a heavy cost especially on devices with relatively low | 1909 // Multisampling has a heavy cost especially on devices with relatively low |
| 1910 // fill rate like most notebooks, and the Mac implementation would need to | 1910 // fill rate like most notebooks, and the Mac implementation would need to |
| 1911 // be optimized to resolve directly into the IOSurface shared between the | 1911 // be optimized to resolve directly into the IOSurface shared between the |
| 1912 // GPU and browser processes. For these reasons and to avoid platform | 1912 // GPU and browser processes. For these reasons and to avoid platform |
| 1913 // disparities we explicitly disable antialiasing. | 1913 // disparities we explicitly disable antialiasing. |
| 1914 WebKit::WebGraphicsContext3D::Attributes attributes; | 1914 WebKit::WebGraphicsContext3D::Attributes attributes; |
| 1915 attributes.antialias = false; | 1915 attributes.antialias = false; |
| 1916 attributes.shareResources = true; | 1916 attributes.shareResources = true; |
| 1917 attributes.noAutomaticFlushes = true; |
| 1917 WebGraphicsContext3D* context = CreateGraphicsContext3D(attributes); | 1918 WebGraphicsContext3D* context = CreateGraphicsContext3D(attributes); |
| 1918 if (!context) | 1919 if (!context) |
| 1919 return NULL; | 1920 return NULL; |
| 1920 | 1921 |
| 1921 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 1922 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 1922 if (command_line.HasSwitch(switches::kEnableSoftwareCompositingGLAdapter)) { | 1923 if (command_line.HasSwitch(switches::kEnableSoftwareCompositingGLAdapter)) { |
| 1923 // In the absence of a software-based delegating renderer, use this | 1924 // In the absence of a software-based delegating renderer, use this |
| 1924 // stopgap adapter class to present the software renderer output using a | 1925 // stopgap adapter class to present the software renderer output using a |
| 1925 // 3d context. | 1926 // 3d context. |
| 1926 return new CompositorOutputSurface(routing_id(), NULL, | 1927 return new CompositorOutputSurface(routing_id(), NULL, |
| (...skipping 4423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6350 | 6351 |
| 6351 updating_frame_tree_ = true; | 6352 updating_frame_tree_ = true; |
| 6352 active_frame_id_map_.clear(); | 6353 active_frame_id_map_.clear(); |
| 6353 | 6354 |
| 6354 target_process_id_ = process_id; | 6355 target_process_id_ = process_id; |
| 6355 target_routing_id_ = route_id; | 6356 target_routing_id_ = route_id; |
| 6356 CreateFrameTree(webview()->mainFrame(), frames); | 6357 CreateFrameTree(webview()->mainFrame(), frames); |
| 6357 | 6358 |
| 6358 updating_frame_tree_ = false; | 6359 updating_frame_tree_ = false; |
| 6359 } | 6360 } |
| OLD | NEW |