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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 1602343002: compositor-worker: cc->blink mutation plumbing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@compositor-worker-ian-patch
Patch Set: Fix DEPS issue and some missing methods Created 4 years, 11 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
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "cc/trees/layer_tree_host.h" 42 #include "cc/trees/layer_tree_host.h"
43 #include "cc/trees/remote_proto_channel.h" 43 #include "cc/trees/remote_proto_channel.h"
44 #include "components/scheduler/renderer/renderer_scheduler.h" 44 #include "components/scheduler/renderer/renderer_scheduler.h"
45 #include "content/common/content_switches_internal.h" 45 #include "content/common/content_switches_internal.h"
46 #include "content/common/gpu/client/context_provider_command_buffer.h" 46 #include "content/common/gpu/client/context_provider_command_buffer.h"
47 #include "content/public/common/content_switches.h" 47 #include "content/public/common/content_switches.h"
48 #include "content/renderer/input/input_handler_manager.h" 48 #include "content/renderer/input/input_handler_manager.h"
49 #include "gpu/command_buffer/client/gles2_interface.h" 49 #include "gpu/command_buffer/client/gles2_interface.h"
50 #include "gpu/command_buffer/service/gpu_switches.h" 50 #include "gpu/command_buffer/service/gpu_switches.h"
51 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac k.h" 51 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac k.h"
52 #include "third_party/WebKit/public/platform/WebCompositorMutations.h"
52 #include "third_party/WebKit/public/platform/WebLayoutAndPaintAsyncCallback.h" 53 #include "third_party/WebKit/public/platform/WebLayoutAndPaintAsyncCallback.h"
53 #include "third_party/WebKit/public/platform/WebSize.h" 54 #include "third_party/WebKit/public/platform/WebSize.h"
54 #include "third_party/WebKit/public/web/WebKit.h" 55 #include "third_party/WebKit/public/web/WebKit.h"
55 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 56 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
56 #include "third_party/WebKit/public/web/WebSelection.h" 57 #include "third_party/WebKit/public/web/WebSelection.h"
57 #include "third_party/WebKit/public/web/WebWidget.h" 58 #include "third_party/WebKit/public/web/WebWidget.h"
58 #include "ui/gl/gl_switches.h" 59 #include "ui/gl/gl_switches.h"
59 #include "ui/native_theme/native_theme_switches.h" 60 #include "ui/native_theme/native_theme_switches.h"
60 61
61 #if defined(OS_ANDROID) 62 #if defined(OS_ANDROID)
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 float page_scale, 905 float page_scale,
905 float top_controls_delta) { 906 float top_controls_delta) {
906 widget_->webwidget()->applyViewportDeltas( 907 widget_->webwidget()->applyViewportDeltas(
907 inner_delta, 908 inner_delta,
908 outer_delta, 909 outer_delta,
909 elastic_overscroll_delta, 910 elastic_overscroll_delta,
910 page_scale, 911 page_scale,
911 top_controls_delta); 912 top_controls_delta);
912 } 913 }
913 914
915 void RenderWidgetCompositor::ApplyMutations(
916 const cc::LayerTreeMutations& mutations) {
917 TRACE_EVENT0("compositor-worker", "RenderWidgetCompositor::ApplyMutations");
918 widget_->webwidget()->applyMutations(
919 static_cast<const blink::WebCompositorMutations&>(mutations));
920 }
921
914 void RenderWidgetCompositor::RequestNewOutputSurface() { 922 void RenderWidgetCompositor::RequestNewOutputSurface() {
915 // If the host is closing, then no more compositing is possible. This 923 // If the host is closing, then no more compositing is possible. This
916 // prevents shutdown races between handling the close message and 924 // prevents shutdown races between handling the close message and
917 // the CreateOutputSurface task. 925 // the CreateOutputSurface task.
918 if (widget_->host_closing()) 926 if (widget_->host_closing())
919 return; 927 return;
920 928
921 bool fallback = 929 bool fallback =
922 num_failed_recreate_attempts_ >= OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK; 930 num_failed_recreate_attempts_ >= OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK;
923 scoped_ptr<cc::OutputSurface> surface(widget_->CreateOutputSurface(fallback)); 931 scoped_ptr<cc::OutputSurface> surface(widget_->CreateOutputSurface(fallback));
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 #endif 1137 #endif
1130 return actual; 1138 return actual;
1131 } 1139 }
1132 1140
1133 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( 1141 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor(
1134 float device_scale) { 1142 float device_scale) {
1135 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); 1143 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale);
1136 } 1144 }
1137 1145
1138 } // namespace content 1146 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698