diff options
36 files changed, 0 insertions, 250 deletions
diff --git a/cc/blink/web_external_texture_layer_impl.cc b/cc/blink/web_external_texture_layer_impl.cc index e9700c6..acc7df4 100644 --- a/cc/blink/web_external_texture_layer_impl.cc +++ b/cc/blink/web_external_texture_layer_impl.cc @@ -57,10 +57,6 @@ void WebExternalTextureLayerImpl::setBlendBackgroundColor(bool blend) { static_cast<TextureLayer*>(layer_->layer())->SetBlendBackgroundColor(blend); } -void WebExternalTextureLayerImpl::setRateLimitContext(bool rate_limit) { - static_cast<TextureLayer*>(layer_->layer())->SetRateLimitContext(rate_limit); -} - void WebExternalTextureLayerImpl::setNearestNeighbor(bool nearest_neighbor) { static_cast<TextureLayer*>(layer_->layer()) ->SetNearestNeighbor(nearest_neighbor); diff --git a/cc/blink/web_external_texture_layer_impl.h b/cc/blink/web_external_texture_layer_impl.h index a12a00b..fc14429 100644 --- a/cc/blink/web_external_texture_layer_impl.h +++ b/cc/blink/web_external_texture_layer_impl.h @@ -43,7 +43,6 @@ class WebExternalTextureLayerImpl virtual void setOpaque(bool opaque); virtual void setPremultipliedAlpha(bool premultiplied); virtual void setBlendBackgroundColor(bool blend); - virtual void setRateLimitContext(bool rate_limit); virtual void setNearestNeighbor(bool nearest_neighbor); // TextureLayerClient implementation. diff --git a/cc/layers/texture_layer.cc b/cc/layers/texture_layer.cc index 20741fd..c9fb61b 100644 --- a/cc/layers/texture_layer.cc +++ b/cc/layers/texture_layer.cc @@ -34,7 +34,6 @@ TextureLayer::TextureLayer(const LayerSettings& settings, uv_bottom_right_(1.f, 1.f), premultiplied_alpha_(true), blend_background_color_(false), - rate_limit_context_(false), needs_set_mailbox_(false) { vertex_opacity_[0] = 1.0f; vertex_opacity_[1] = 1.0f; @@ -46,8 +45,6 @@ TextureLayer::~TextureLayer() { } void TextureLayer::ClearClient() { - if (rate_limit_context_ && client_ && layer_tree_host()) - layer_tree_host()->StopRateLimiter(); client_ = nullptr; ClearTexture(); UpdateDrawsContent(HasDrawableContent()); @@ -118,13 +115,6 @@ void TextureLayer::SetBlendBackgroundColor(bool blend) { SetNeedsCommit(); } -void TextureLayer::SetRateLimitContext(bool rate_limit) { - if (!rate_limit && rate_limit_context_ && client_ && layer_tree_host()) - layer_tree_host()->StopRateLimiter(); - - rate_limit_context_ = rate_limit; -} - void TextureLayer::SetTextureMailboxInternal( const TextureMailbox& mailbox, scoped_ptr<SingleReleaseCallback> release_callback, @@ -185,9 +175,6 @@ void TextureLayer::SetTextureMailboxWithoutReleaseCallback( void TextureLayer::SetNeedsDisplayRect(const gfx::Rect& dirty_rect) { Layer::SetNeedsDisplayRect(dirty_rect); - - if (rate_limit_context_ && client_ && layer_tree_host() && DrawsContent()) - layer_tree_host()->StartRateLimiter(); } void TextureLayer::SetLayerTreeHost(LayerTreeHost* host) { @@ -196,10 +183,6 @@ void TextureLayer::SetLayerTreeHost(LayerTreeHost* host) { return; } - if (layer_tree_host()) { - if (rate_limit_context_ && client_) - layer_tree_host()->StopRateLimiter(); - } // If we're removed from the tree, the TextureLayerImpl will be destroyed, and // we will need to set the mailbox again on a new TextureLayerImpl the next // time we push. diff --git a/cc/layers/texture_layer.h b/cc/layers/texture_layer.h index 53f2d8d..0c0b2ec 100644 --- a/cc/layers/texture_layer.h +++ b/cc/layers/texture_layer.h @@ -124,11 +124,6 @@ class CC_EXPORT TextureLayer : public Layer { // at draw time. Defaults to false. void SetBlendBackgroundColor(bool blend); - // Sets whether this context should rate limit on damage to prevent too many - // frames from being queued up before the compositor gets a chance to run. - // Requires a non-nil client. Defaults to false. - void SetRateLimitContext(bool rate_limit); - // Code path for plugins which supply their own mailbox. void SetTextureMailbox(const TextureMailbox& mailbox, scoped_ptr<SingleReleaseCallback> release_callback); @@ -167,7 +162,6 @@ class CC_EXPORT TextureLayer : public Layer { float vertex_opacity_[4]; bool premultiplied_alpha_; bool blend_background_color_; - bool rate_limit_context_; scoped_ptr<TextureMailboxHolder::MainThreadReference> holder_ref_; bool needs_set_mailbox_; diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc index 8289429..22962a7 100644 --- a/cc/layers/texture_layer_unittest.cc +++ b/cc/layers/texture_layer_unittest.cc @@ -236,55 +236,6 @@ TEST_F(TextureLayerTest, CheckPropertyChangeCausesCorrectBehavior) { EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetBlendBackgroundColor(true)); } -TEST_F(TextureLayerTest, RateLimiter) { - FakeTextureLayerClient client; - scoped_refptr<TextureLayer> test_layer = - TextureLayer::CreateForMailbox(layer_settings_, &client); - test_layer->SetIsDrawable(true); - EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AnyNumber()); - layer_tree_host_->SetRootLayer(test_layer); - - // Don't rate limit until we invalidate. - EXPECT_CALL(*layer_tree_host_, StartRateLimiter()).Times(0); - test_layer->SetRateLimitContext(true); - Mock::VerifyAndClearExpectations(layer_tree_host_.get()); - - // Do rate limit after we invalidate. - EXPECT_CALL(*layer_tree_host_, StartRateLimiter()); - test_layer->SetNeedsDisplay(); - Mock::VerifyAndClearExpectations(layer_tree_host_.get()); - - // Stop rate limiter when we don't want it any more. - EXPECT_CALL(*layer_tree_host_, StopRateLimiter()); - test_layer->SetRateLimitContext(false); - Mock::VerifyAndClearExpectations(layer_tree_host_.get()); - - // Or we clear the client. - test_layer->SetRateLimitContext(true); - EXPECT_CALL(*layer_tree_host_, StopRateLimiter()); - EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AnyNumber()); - test_layer->ClearClient(); - Mock::VerifyAndClearExpectations(layer_tree_host_.get()); - - // Reset to a layer with a client, that started the rate limiter. - test_layer = TextureLayer::CreateForMailbox(layer_settings_, &client); - test_layer->SetIsDrawable(true); - test_layer->SetRateLimitContext(true); - EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AnyNumber()); - layer_tree_host_->SetRootLayer(test_layer); - EXPECT_CALL(*layer_tree_host_, StartRateLimiter()).Times(0); - Mock::VerifyAndClearExpectations(layer_tree_host_.get()); - EXPECT_CALL(*layer_tree_host_, StartRateLimiter()); - test_layer->SetNeedsDisplay(); - Mock::VerifyAndClearExpectations(layer_tree_host_.get()); - - // Stop rate limiter when we're removed from the tree. - EXPECT_CALL(*layer_tree_host_, StopRateLimiter()); - EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(1); - layer_tree_host_->SetRootLayer(nullptr); - Mock::VerifyAndClearExpectations(layer_tree_host_.get()); -} - class TestMailboxHolder : public TextureLayer::TextureMailboxHolder { public: using TextureLayer::TextureMailboxHolder::Create; diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc index 14a48bf..71c79e4 100644 --- a/cc/output/gl_renderer.cc +++ b/cc/output/gl_renderer.cc @@ -502,11 +502,6 @@ void GLRenderer::BeginDrawingFrame(DrawingFrame* frame) { ReinitializeGLState(); } -void GLRenderer::DoNoOp() { - gl_->BindFramebuffer(GL_FRAMEBUFFER, 0); - gl_->Flush(); -} - void GLRenderer::DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad, const gfx::QuadF* clip_region) { diff --git a/cc/output/gl_renderer.h b/cc/output/gl_renderer.h index c42f221..a090324 100644 --- a/cc/output/gl_renderer.h +++ b/cc/output/gl_renderer.h @@ -62,7 +62,6 @@ class CC_EXPORT GLRenderer : public DirectRenderer { // Waits for rendering to finish. void Finish() override; - void DoNoOp() override; void SwapBuffers(const CompositorFrameMetadata& metadata) override; virtual bool IsContextLost(); diff --git a/cc/output/renderer.h b/cc/output/renderer.h index 8143e2a..96406a2 100644 --- a/cc/output/renderer.h +++ b/cc/output/renderer.h @@ -73,8 +73,6 @@ class CC_EXPORT Renderer { // Waits for rendering to finish. virtual void Finish() = 0; - virtual void DoNoOp() {} - // Puts backbuffer onscreen. virtual void SwapBuffers(const CompositorFrameMetadata& metadata) = 0; virtual void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {} diff --git a/cc/test/fake_proxy.h b/cc/test/fake_proxy.h index b840f33..0226431 100644 --- a/cc/test/fake_proxy.h +++ b/cc/test/fake_proxy.h @@ -42,7 +42,6 @@ class FakeProxy : public Proxy { bool CommitRequested() const override; void Start() override {} void Stop() override {} - void ForceSerializeOnSwapBuffers() override {} bool SupportsImplScrolling() const override; bool MainFrameWillHappenForTesting() override; void SetChildrenNeedBeginFrames(bool children_need_begin_frames) override {} diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc index 85790d7..d5bbe66 100644 --- a/cc/trees/layer_tree_host.cc +++ b/cc/trees/layer_tree_host.cc @@ -87,7 +87,6 @@ scoped_ptr<LayerTreeHost> LayerTreeHost::CreateSingleThreaded( LayerTreeHost::LayerTreeHost(InitParams* params) : micro_benchmark_controller_(this), next_ui_resource_id_(1), - inside_begin_main_frame_(false), needs_full_tree_sync_(true), needs_meta_info_recomputation_(true), client_(params->client), @@ -223,9 +222,7 @@ void LayerTreeHost::BeginMainFrameNotExpectedSoon() { } void LayerTreeHost::BeginMainFrame(const BeginFrameArgs& args) { - inside_begin_main_frame_ = true; client_->BeginMainFrame(args); - inside_begin_main_frame_ = false; } void LayerTreeHost::DidStopFlinging() { @@ -863,30 +860,6 @@ void LayerTreeHost::ApplyScrollAndScale(ScrollAndScaleSet* info) { } } -void LayerTreeHost::StartRateLimiter() { - if (inside_begin_main_frame_) - return; - - if (!rate_limit_timer_.IsRunning()) { - rate_limit_timer_.Start(FROM_HERE, - base::TimeDelta(), - this, - &LayerTreeHost::RateLimit); - } -} - -void LayerTreeHost::StopRateLimiter() { - rate_limit_timer_.Stop(); -} - -void LayerTreeHost::RateLimit() { - // Force a no-op command on the compositor context, so that any ratelimiting - // commands will wait for the compositing context, and therefore for the - // SwapBuffers. - proxy_->ForceSerializeOnSwapBuffers(); - client_->RateLimitSharedMainThreadContext(); -} - void LayerTreeHost::SetDeviceScaleFactor(float device_scale_factor) { if (device_scale_factor == device_scale_factor_) return; diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h index 767cec8..6ddef26 100644 --- a/cc/trees/layer_tree_host.h +++ b/cc/trees/layer_tree_host.h @@ -17,7 +17,6 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/time/time.h" -#include "base/timer/timer.h" #include "cc/animation/animation_events.h" #include "cc/base/cc_export.h" #include "cc/base/scoped_ptr_vector.h" @@ -244,12 +243,6 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient { void ApplyScrollAndScale(ScrollAndScaleSet* info); void SetImplTransform(const gfx::Transform& transform); - // Virtual for tests. - virtual void StartRateLimiter(); - virtual void StopRateLimiter(); - - void RateLimit(); - void SetDeviceScaleFactor(float device_scale_factor); float device_scale_factor() const { return device_scale_factor_; } @@ -424,7 +417,6 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient { void SetPropertyTreesNeedRebuild(); - bool inside_begin_main_frame_; bool needs_full_tree_sync_; bool needs_meta_info_recomputation_; @@ -455,8 +447,6 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient { bool visible_; - base::OneShotTimer<LayerTreeHost> rate_limit_timer_; - float page_scale_factor_; float min_page_scale_factor_; float max_page_scale_factor_; diff --git a/cc/trees/layer_tree_host_client.h b/cc/trees/layer_tree_host_client.h index 56a128f..3bc70c5 100644 --- a/cc/trees/layer_tree_host_client.h +++ b/cc/trees/layer_tree_host_client.h @@ -58,12 +58,6 @@ class LayerTreeHostClient { // implementation is ready. virtual void SendBeginFramesToChildren(const BeginFrameArgs& args) {} - // Requests that the client insert a rate limiting token in the shared main - // thread context's command stream that will block if the context gets too far - // ahead of the compositor's command stream. Only needed if the tree contains - // a TextureLayer that calls SetRateLimitContext(true). - virtual void RateLimitSharedMainThreadContext() {} - protected: virtual ~LayerTreeHostClient() {} }; diff --git a/cc/trees/proxy.h b/cc/trees/proxy.h index f4388ff..05dfe69 100644 --- a/cc/trees/proxy.h +++ b/cc/trees/proxy.h @@ -95,10 +95,6 @@ class CC_EXPORT Proxy { virtual void Start() = 0; virtual void Stop() = 0; // Must be called before deleting the proxy. - // Forces 3D commands on all contexts to wait for all previous SwapBuffers - // to finish before executing in the GPU process. - virtual void ForceSerializeOnSwapBuffers() = 0; - virtual bool SupportsImplScrolling() const = 0; virtual void SetChildrenNeedBeginFrames(bool children_need_begin_frames) = 0; diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc index 61a963e..8ab3bc2 100644 --- a/cc/trees/single_thread_proxy.cc +++ b/cc/trees/single_thread_proxy.cc @@ -598,16 +598,6 @@ void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { } } -void SingleThreadProxy::ForceSerializeOnSwapBuffers() { - { - DebugScopedSetImplThread impl(this); - if (layer_tree_host_impl_->renderer()) { - DCHECK(!layer_tree_host_->output_surface_lost()); - layer_tree_host_impl_->renderer()->DoNoOp(); - } - } -} - bool SingleThreadProxy::SupportsImplScrolling() const { return false; } diff --git a/cc/trees/single_thread_proxy.h b/cc/trees/single_thread_proxy.h index f5cdf41..4829d22 100644 --- a/cc/trees/single_thread_proxy.h +++ b/cc/trees/single_thread_proxy.h @@ -56,7 +56,6 @@ class CC_EXPORT SingleThreadProxy : public Proxy, void MainThreadHasStoppedFlinging() override {} void Start() override; void Stop() override; - void ForceSerializeOnSwapBuffers() override; bool SupportsImplScrolling() const override; bool MainFrameWillHappenForTesting() override; void SetChildrenNeedBeginFrames(bool children_need_begin_frames) override; diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc index ae543a3..df9d560 100644 --- a/cc/trees/thread_proxy.cc +++ b/cc/trees/thread_proxy.cc @@ -623,24 +623,6 @@ void ThreadProxy::Stop() { main().started = false; } -void ThreadProxy::ForceSerializeOnSwapBuffers() { - DebugScopedSetMainThreadBlocked main_thread_blocked(this); - CompletionEvent completion; - Proxy::ImplThreadTaskRunner()->PostTask( - FROM_HERE, - base::Bind(&ThreadProxy::ForceSerializeOnSwapBuffersOnImplThread, - impl_thread_weak_ptr_, - &completion)); - completion.Wait(); -} - -void ThreadProxy::ForceSerializeOnSwapBuffersOnImplThread( - CompletionEvent* completion) { - if (impl().layer_tree_host_impl->renderer()) - impl().layer_tree_host_impl->renderer()->DoNoOp(); - completion->Signal(); -} - bool ThreadProxy::SupportsImplScrolling() const { return true; } diff --git a/cc/trees/thread_proxy.h b/cc/trees/thread_proxy.h index 1a14063..9cbfc9a 100644 --- a/cc/trees/thread_proxy.h +++ b/cc/trees/thread_proxy.h @@ -172,7 +172,6 @@ class CC_EXPORT ThreadProxy : public Proxy, void MainThreadHasStoppedFlinging() override; void Start() override; void Stop() override; - void ForceSerializeOnSwapBuffers() override; bool SupportsImplScrolling() const override; bool MainFrameWillHappenForTesting() override; void SetChildrenNeedBeginFrames(bool children_need_begin_frames) override; @@ -281,7 +280,6 @@ class CC_EXPORT ThreadProxy : public Proxy, void FinishGLOnImplThread(CompletionEvent* completion); void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); DrawResult DrawSwapInternal(bool forced_draw); - void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); void MainFrameWillHappenOnImplThreadForTesting(CompletionEvent* completion, bool* main_frame_will_happen); void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); diff --git a/components/html_viewer/web_layer_tree_view_impl.h b/components/html_viewer/web_layer_tree_view_impl.h index b78b556..3a48bc3 100644 --- a/components/html_viewer/web_layer_tree_view_impl.h +++ b/components/html_viewer/web_layer_tree_view_impl.h @@ -70,7 +70,6 @@ class WebLayerTreeViewImpl : public blink::WebLayerTreeView, void DidCommitAndDrawFrame() override; void DidCompleteSwapBuffers() override; void DidCompletePageScaleAnimation() override {} - void RateLimitSharedMainThreadContext() override {} void RecordFrameTimingEvents( scoped_ptr<cc::FrameTimingTracker::CompositeTimingSet> composite_events, scoped_ptr<cc::FrameTimingTracker::MainFrameTimingSet> main_frame_events) diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc index 75828bf..fe475a0 100644 --- a/content/renderer/gpu/render_widget_compositor.cc +++ b/content/renderer/gpu/render_widget_compositor.cc @@ -1005,16 +1005,6 @@ void RenderWidgetCompositor::RecordFrameTimingEvents( } } -void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { - cc::ContextProvider* provider = - compositor_deps_->GetSharedMainThreadContextProvider(); - // provider can be NULL after the GPU process crashed enough times and we - // don't want to restart it any more (falling back to software). - if (!provider) - return; - provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); -} - void RenderWidgetCompositor::SetSurfaceIdNamespace( uint32_t surface_id_namespace) { layer_tree_host_->set_surface_id_namespace(surface_id_namespace); diff --git a/content/renderer/gpu/render_widget_compositor.h b/content/renderer/gpu/render_widget_compositor.h index 6bd0d0c..911b4fa 100644 --- a/content/renderer/gpu/render_widget_compositor.h +++ b/content/renderer/gpu/render_widget_compositor.h @@ -155,7 +155,6 @@ class CONTENT_EXPORT RenderWidgetCompositor void DidCommitAndDrawFrame() override; void DidCompleteSwapBuffers() override; void DidCompletePageScaleAnimation() override; - void RateLimitSharedMainThreadContext() override; void RecordFrameTimingEvents( scoped_ptr<cc::FrameTimingTracker::CompositeTimingSet> composite_events, scoped_ptr<cc::FrameTimingTracker::MainFrameTimingSet> main_frame_events) diff --git a/gpu/GLES2/gl2chromium_autogen.h b/gpu/GLES2/gl2chromium_autogen.h index 810eff8..2e6ed9b 100644 --- a/gpu/GLES2/gl2chromium_autogen.h +++ b/gpu/GLES2/gl2chromium_autogen.h @@ -280,8 +280,6 @@ #define glGetRequestableExtensionsCHROMIUM \ GLES2_GET_FUN(GetRequestableExtensionsCHROMIUM) #define glRequestExtensionCHROMIUM GLES2_GET_FUN(RequestExtensionCHROMIUM) -#define glRateLimitOffscreenContextCHROMIUM \ - GLES2_GET_FUN(RateLimitOffscreenContextCHROMIUM) #define glGetProgramInfoCHROMIUM GLES2_GET_FUN(GetProgramInfoCHROMIUM) #define glGetUniformBlocksCHROMIUM GLES2_GET_FUN(GetUniformBlocksCHROMIUM) #define glGetTransformFeedbackVaryingsCHROMIUM \ diff --git a/gpu/GLES2/gl2extchromium.h b/gpu/GLES2/gl2extchromium.h index f96c930..74988dc 100644 --- a/gpu/GLES2/gl2extchromium.h +++ b/gpu/GLES2/gl2extchromium.h @@ -227,15 +227,6 @@ typedef void (GL_APIENTRYP PFNGLRELEASETEXIMAGE2DCHROMIUMPROC) ( GLenum target, GLint imageId); #endif /* GL_CHROMIUM_texture_from_image */ -/* GL_CHROMIUM_rate_limit_offscreen_context */ -#ifndef GL_CHROMIUM_rate_limit_offscreen_context -#define GL_CHROMIUM_rate_limit_offscreen_context 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRateLimitOffscreenContextCHROMIUM(); -#endif -typedef void (GL_APIENTRYP PFNGLRATELIMITOFFSCREENCONTEXTCHROMIUMPROC) (); -#endif /* GL_CHROMIUM_rate_limit_offscreen_context */ - /* GL_CHROMIUM_post_sub_buffer */ #ifndef GL_CHROMIUM_post_sub_buffer #define GL_CHROMIUM_post_sub_buffer 1 diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py index 679eeea..d6d81ea 100755 --- a/gpu/command_buffer/build_gles2_cmd_buffer.py +++ b/gpu/command_buffer/build_gles2_cmd_buffer.py @@ -3758,12 +3758,6 @@ _FUNCTION_INFO = { 'extension': 'CHROMIUM_request_extension', 'chromium': True, }, - 'RateLimitOffscreenContextCHROMIUM': { - 'gen_cmd': False, - 'extension': True, - 'chromium': True, - 'client_test': False, - }, 'CreateStreamTextureCHROMIUM': { 'type': 'HandWritten', 'impl_func': False, diff --git a/gpu/command_buffer/client/gles2_c_lib_autogen.h b/gpu/command_buffer/client/gles2_c_lib_autogen.h index 870a4f9..e1ce501 100644 --- a/gpu/command_buffer/client/gles2_c_lib_autogen.h +++ b/gpu/command_buffer/client/gles2_c_lib_autogen.h @@ -1269,9 +1269,6 @@ const GLchar* GL_APIENTRY GLES2GetRequestableExtensionsCHROMIUM() { void GL_APIENTRY GLES2RequestExtensionCHROMIUM(const char* extension) { gles2::GetGLContext()->RequestExtensionCHROMIUM(extension); } -void GL_APIENTRY GLES2RateLimitOffscreenContextCHROMIUM() { - gles2::GetGLContext()->RateLimitOffscreenContextCHROMIUM(); -} void GL_APIENTRY GLES2GetProgramInfoCHROMIUM(GLuint program, GLsizei bufsize, GLsizei* size, @@ -2561,11 +2558,6 @@ extern const NameToFunc g_gles2_function_table[] = { reinterpret_cast<GLES2FunctionPointer>(glRequestExtensionCHROMIUM), }, { - "glRateLimitOffscreenContextCHROMIUM", - reinterpret_cast<GLES2FunctionPointer>( - glRateLimitOffscreenContextCHROMIUM), - }, - { "glGetProgramInfoCHROMIUM", reinterpret_cast<GLES2FunctionPointer>(glGetProgramInfoCHROMIUM), }, diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index 2bf603b..2b186a4 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc @@ -4655,17 +4655,6 @@ void GLES2Implementation::RequestExtensionCHROMIUM(const char* extension) { } } -void GLES2Implementation::RateLimitOffscreenContextCHROMIUM() { - GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glRateLimitOffscreenCHROMIUM()"); - // Wait if this would add too many rate limit tokens. - if (rate_limit_tokens_.size() == kMaxSwapBuffers) { - helper_->WaitForToken(rate_limit_tokens_.front()); - rate_limit_tokens_.pop(); - } - rate_limit_tokens_.push(helper_->InsertToken()); -} - void GLES2Implementation::GetProgramInfoCHROMIUMHelper( GLuint program, std::vector<int8>* result) { DCHECK(result); diff --git a/gpu/command_buffer/client/gles2_implementation_autogen.h b/gpu/command_buffer/client/gles2_implementation_autogen.h index 48d2e4f..305f971 100644 --- a/gpu/command_buffer/client/gles2_implementation_autogen.h +++ b/gpu/command_buffer/client/gles2_implementation_autogen.h @@ -876,8 +876,6 @@ const GLchar* GetRequestableExtensionsCHROMIUM() override; void RequestExtensionCHROMIUM(const char* extension) override; -void RateLimitOffscreenContextCHROMIUM() override; - void GetProgramInfoCHROMIUM(GLuint program, GLsizei bufsize, GLsizei* size, diff --git a/gpu/command_buffer/client/gles2_interface_autogen.h b/gpu/command_buffer/client/gles2_interface_autogen.h index be4f4ee..43e3b90 100644 --- a/gpu/command_buffer/client/gles2_interface_autogen.h +++ b/gpu/command_buffer/client/gles2_interface_autogen.h @@ -649,7 +649,6 @@ virtual void ResizeCHROMIUM(GLuint width, GLfloat scale_factor) = 0; virtual const GLchar* GetRequestableExtensionsCHROMIUM() = 0; virtual void RequestExtensionCHROMIUM(const char* extension) = 0; -virtual void RateLimitOffscreenContextCHROMIUM() = 0; virtual void GetProgramInfoCHROMIUM(GLuint program, GLsizei bufsize, GLsizei* size, diff --git a/gpu/command_buffer/client/gles2_interface_stub_autogen.h b/gpu/command_buffer/client/gles2_interface_stub_autogen.h index 321ce34..0d08d67 100644 --- a/gpu/command_buffer/client/gles2_interface_stub_autogen.h +++ b/gpu/command_buffer/client/gles2_interface_stub_autogen.h @@ -626,7 +626,6 @@ void UnmapTexSubImage2DCHROMIUM(const void* mem) override; void ResizeCHROMIUM(GLuint width, GLuint height, GLfloat scale_factor) override; const GLchar* GetRequestableExtensionsCHROMIUM() override; void RequestExtensionCHROMIUM(const char* extension) override; -void RateLimitOffscreenContextCHROMIUM() override; void GetProgramInfoCHROMIUM(GLuint program, GLsizei bufsize, GLsizei* size, diff --git a/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h b/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h index 1318f09..6e30251 100644 --- a/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h +++ b/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h @@ -866,7 +866,6 @@ const GLchar* GLES2InterfaceStub::GetRequestableExtensionsCHROMIUM() { } void GLES2InterfaceStub::RequestExtensionCHROMIUM(const char* /* extension */) { } -void GLES2InterfaceStub::RateLimitOffscreenContextCHROMIUM() {} void GLES2InterfaceStub::GetProgramInfoCHROMIUM(GLuint /* program */, GLsizei /* bufsize */, GLsizei* /* size */, diff --git a/gpu/command_buffer/client/gles2_trace_implementation_autogen.h b/gpu/command_buffer/client/gles2_trace_implementation_autogen.h index 241623d..41140be 100644 --- a/gpu/command_buffer/client/gles2_trace_implementation_autogen.h +++ b/gpu/command_buffer/client/gles2_trace_implementation_autogen.h @@ -626,7 +626,6 @@ void UnmapTexSubImage2DCHROMIUM(const void* mem) override; void ResizeCHROMIUM(GLuint width, GLuint height, GLfloat scale_factor) override; const GLchar* GetRequestableExtensionsCHROMIUM() override; void RequestExtensionCHROMIUM(const char* extension) override; -void RateLimitOffscreenContextCHROMIUM() override; void GetProgramInfoCHROMIUM(GLuint program, GLsizei bufsize, GLsizei* size, diff --git a/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h b/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h index d527fd1..11d76df9 100644 --- a/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h +++ b/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h @@ -1853,12 +1853,6 @@ void GLES2TraceImplementation::RequestExtensionCHROMIUM(const char* extension) { gl_->RequestExtensionCHROMIUM(extension); } -void GLES2TraceImplementation::RateLimitOffscreenContextCHROMIUM() { - TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "GLES2Trace::RateLimitOffscreenContextCHROMIUM"); - gl_->RateLimitOffscreenContextCHROMIUM(); -} - void GLES2TraceImplementation::GetProgramInfoCHROMIUM(GLuint program, GLsizei bufsize, GLsizei* size, diff --git a/gpu/command_buffer/cmd_buffer_functions.txt b/gpu/command_buffer/cmd_buffer_functions.txt index f355571..9eda893e 100644 --- a/gpu/command_buffer/cmd_buffer_functions.txt +++ b/gpu/command_buffer/cmd_buffer_functions.txt @@ -268,7 +268,6 @@ GL_APICALL void GL_APIENTRY glUnmapTexSubImage2DCHROMIUM (const void* me GL_APICALL void GL_APIENTRY glResizeCHROMIUM (GLuint width, GLuint height, GLfloat scale_factor); GL_APICALL const GLchar* GL_APIENTRY glGetRequestableExtensionsCHROMIUM (void); GL_APICALL void GL_APIENTRY glRequestExtensionCHROMIUM (const char* extension); -GL_APICALL void GL_APIENTRY glRateLimitOffscreenContextCHROMIUM (void); GL_APICALL void GL_APIENTRY glGetProgramInfoCHROMIUM (GLidProgram program, GLsizeiNotNegative bufsize, GLsizei* size, void* info); GL_APICALL void GL_APIENTRY glGetUniformBlocksCHROMIUM (GLidProgram program, GLsizeiNotNegative bufsize, GLsizei* size, void* info); GL_APICALL void GL_APIENTRY glGetTransformFeedbackVaryingsCHROMIUM (GLidProgram program, GLsizeiNotNegative bufsize, GLsizei* size, void* info); diff --git a/mojo/gpu/mojo_gles2_impl_autogen.cc b/mojo/gpu/mojo_gles2_impl_autogen.cc index 9f35d07..5237b66 100644 --- a/mojo/gpu/mojo_gles2_impl_autogen.cc +++ b/mojo/gpu/mojo_gles2_impl_autogen.cc @@ -1422,10 +1422,6 @@ void MojoGLES2Impl::RequestExtensionCHROMIUM(const char* extension) { MojoGLES2MakeCurrent(context_); glRequestExtensionCHROMIUM(extension); } -void MojoGLES2Impl::RateLimitOffscreenContextCHROMIUM() { - MojoGLES2MakeCurrent(context_); - glRateLimitOffscreenContextCHROMIUM(); -} void MojoGLES2Impl::GetProgramInfoCHROMIUM(GLuint program, GLsizei bufsize, GLsizei* size, diff --git a/mojo/gpu/mojo_gles2_impl_autogen.h b/mojo/gpu/mojo_gles2_impl_autogen.h index f5f8b75..872c4f7 100644 --- a/mojo/gpu/mojo_gles2_impl_autogen.h +++ b/mojo/gpu/mojo_gles2_impl_autogen.h @@ -652,7 +652,6 @@ class MojoGLES2Impl : public gpu::gles2::GLES2Interface { GLfloat scale_factor) override; const GLchar* GetRequestableExtensionsCHROMIUM() override; void RequestExtensionCHROMIUM(const char* extension) override; - void RateLimitOffscreenContextCHROMIUM() override; void GetProgramInfoCHROMIUM(GLuint program, GLsizei bufsize, GLsizei* size, diff --git a/ppapi/lib/gl/include/GLES2/gl2ext.h b/ppapi/lib/gl/include/GLES2/gl2ext.h index d690a9d..0ef4123 100644 --- a/ppapi/lib/gl/include/GLES2/gl2ext.h +++ b/ppapi/lib/gl/include/GLES2/gl2ext.h @@ -1784,25 +1784,6 @@ typedef void (GL_APIENTRYP PFNGLREQUESTEXTENSIONCHROMIUM) (const GLchar *extensi #endif #endif -/* GL_CHROMIUM_rate_limit_offscreen_context */ -/* - * This extension will block if the calling context has gotten more than two - * glRateLimit calls ahead of the GPU process. This keeps the client in sync - * with the GPU without having to call swapbuffers, which has potentially - * undesirable side effects. - */ -#ifndef GL_CHROMIUM_rate_limit_offscreen_context -#define GL_CHROMIUM_rate_limit_offscreen_context 1 -#ifdef GL_GLEXT_PROTOTYPES -#define glRateLimitOffscreenContextCHROMIUM GLES2_GET_FUN(RateLimitOffscreenContextCHROMIUM) -#if !defined(GLES2_USE_CPP_BINDINGS) -GL_APICALL void GL_APIENTRY glRateLimitOffscreenContextCHROMIUM (void); -#endif -#else -typedef void (GL_APIENTRYP PFNGLRATELIMITOFFSCREENCONTEXTCHROMIUM) (); -#endif -#endif - /* GL_CHROMIUM_get_multiple */ /* * This extension provides functions for quering multiple GL state with a single diff --git a/third_party/mojo/src/mojo/public/c/gles2/gles2_call_visitor_chromium_extension_autogen.h b/third_party/mojo/src/mojo/public/c/gles2/gles2_call_visitor_chromium_extension_autogen.h index d0d7ac8..9f3788c 100644 --- a/third_party/mojo/src/mojo/public/c/gles2/gles2_call_visitor_chromium_extension_autogen.h +++ b/third_party/mojo/src/mojo/public/c/gles2/gles2_call_visitor_chromium_extension_autogen.h @@ -149,7 +149,6 @@ VISIT_GL_CALL(RequestExtensionCHROMIUM, void, (const char* extension), (extension)) -VISIT_GL_CALL(RateLimitOffscreenContextCHROMIUM, void, (), ()) VISIT_GL_CALL(GetProgramInfoCHROMIUM, void, (GLuint program, GLsizei bufsize, GLsizei* size, void* info), |