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

Side by Side Diff: content/browser/android/in_process/synchronous_compositor_impl.cc

Issue 394113002: Tiling priorities in Android Webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/browser/android/in_process/synchronous_compositor_impl.h" 5 #include "content/browser/android/in_process/synchronous_compositor_impl.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "cc/input/input_handler.h" 9 #include "cc/input/input_handler.h"
10 #include "content/browser/android/in_process/synchronous_compositor_factory_impl .h" 10 #include "content/browser/android/in_process/synchronous_compositor_factory_impl .h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 gpu::GLInProcessContext* SynchronousCompositorImpl::GetShareContext() { 118 gpu::GLInProcessContext* SynchronousCompositorImpl::GetShareContext() {
119 DCHECK(CalledOnValidThread()); 119 DCHECK(CalledOnValidThread());
120 return g_factory.Get().GetShareContext(); 120 return g_factory.Get().GetShareContext();
121 } 121 }
122 122
123 scoped_ptr<cc::CompositorFrame> SynchronousCompositorImpl::DemandDrawHw( 123 scoped_ptr<cc::CompositorFrame> SynchronousCompositorImpl::DemandDrawHw(
124 gfx::Size surface_size, 124 gfx::Size surface_size,
125 const gfx::Transform& transform, 125 const gfx::Transform& transform,
126 gfx::Rect viewport, 126 gfx::Rect viewport,
127 gfx::Rect clip) { 127 gfx::Rect clip,
128 gfx::Rect external_tiling_rect,
129 gfx::Transform external_tiling_transform) {
128 DCHECK(CalledOnValidThread()); 130 DCHECK(CalledOnValidThread());
129 DCHECK(output_surface_); 131 DCHECK(output_surface_);
130 132
131 scoped_ptr<cc::CompositorFrame> frame = 133 scoped_ptr<cc::CompositorFrame> frame =
132 output_surface_->DemandDrawHw(surface_size, transform, viewport, clip); 134 output_surface_->DemandDrawHw(surface_size,
135 transform,
136 viewport,
137 clip,
138 external_tiling_rect,
139 external_tiling_transform);
133 if (frame.get()) 140 if (frame.get())
134 UpdateFrameMetaData(frame->metadata); 141 UpdateFrameMetaData(frame->metadata);
135 return frame.Pass(); 142 return frame.Pass();
136 } 143 }
137 144
138 void SynchronousCompositorImpl::ReturnResources( 145 void SynchronousCompositorImpl::ReturnResources(
139 const cc::CompositorFrameAck& frame_ack) { 146 const cc::CompositorFrameAck& frame_ack) {
140 DCHECK(CalledOnValidThread()); 147 DCHECK(CalledOnValidThread());
141 output_surface_->ReturnResources(frame_ack); 148 output_surface_->ReturnResources(frame_ack);
142 } 149 }
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 g_factory.Get(); // Ensure it's initialized. 296 g_factory.Get(); // Ensure it's initialized.
290 SynchronousCompositorImpl::CreateForWebContents(contents); 297 SynchronousCompositorImpl::CreateForWebContents(contents);
291 } 298 }
292 if (SynchronousCompositorImpl* instance = 299 if (SynchronousCompositorImpl* instance =
293 SynchronousCompositorImpl::FromWebContents(contents)) { 300 SynchronousCompositorImpl::FromWebContents(contents)) {
294 instance->SetClient(client); 301 instance->SetClient(client);
295 } 302 }
296 } 303 }
297 304
298 } // namespace content 305 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698