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

Side by Side Diff: content/renderer/render_widget.cc

Issue 199443004: gpu: Raise GL_OUT_OF_MEMORY when BeginQueryEXT fails to allocate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: checkmem: Created 6 years, 9 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 | Annotate | Revision Log
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/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/debug/trace_event_synthetic_delay.h" 10 #include "base/debug/trace_event_synthetic_delay.h"
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 // fill rate like most notebooks, and the Mac implementation would need to 887 // fill rate like most notebooks, and the Mac implementation would need to
888 // be optimized to resolve directly into the IOSurface shared between the 888 // be optimized to resolve directly into the IOSurface shared between the
889 // GPU and browser processes. For these reasons and to avoid platform 889 // GPU and browser processes. For these reasons and to avoid platform
890 // disparities we explicitly disable antialiasing. 890 // disparities we explicitly disable antialiasing.
891 blink::WebGraphicsContext3D::Attributes attributes; 891 blink::WebGraphicsContext3D::Attributes attributes;
892 attributes.antialias = false; 892 attributes.antialias = false;
893 attributes.shareResources = true; 893 attributes.shareResources = true;
894 attributes.noAutomaticFlushes = true; 894 attributes.noAutomaticFlushes = true;
895 attributes.depth = false; 895 attributes.depth = false;
896 attributes.stencil = false; 896 attributes.stencil = false;
897 attributes.loseContextWhenOutOfMemory = true;
897 898
898 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 899 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
899 scoped_refptr<ContextProviderCommandBuffer> context_provider; 900 scoped_refptr<ContextProviderCommandBuffer> context_provider;
900 if (!fallback) { 901 if (!fallback) {
901 context_provider = ContextProviderCommandBuffer::Create( 902 context_provider = ContextProviderCommandBuffer::Create(
902 CreateGraphicsContext3D(attributes), 903 CreateGraphicsContext3D(attributes),
903 "RenderCompositor"); 904 "RenderCompositor");
904 } 905 }
905 906
906 uint32 output_surface_id = next_output_surface_id_++; 907 uint32 output_surface_id = next_output_surface_id_++;
(...skipping 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after
2833 2834
2834 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { 2835 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) {
2835 swapped_out_frames_.AddObserver(frame); 2836 swapped_out_frames_.AddObserver(frame);
2836 } 2837 }
2837 2838
2838 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { 2839 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) {
2839 swapped_out_frames_.RemoveObserver(frame); 2840 swapped_out_frames_.RemoveObserver(frame);
2840 } 2841 }
2841 2842
2842 } // namespace content 2843 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698