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

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

Issue 517893002: Cleanup resourceless_software_draw() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_output_surfa ce.h" 5 #include "content/browser/android/in_process/synchronous_compositor_output_surfa ce.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "cc/output/begin_frame_args.h" 9 #include "cc/output/begin_frame_args.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 SkIRect canvas_clip; 193 SkIRect canvas_clip;
194 canvas->getClipDeviceBounds(&canvas_clip); 194 canvas->getClipDeviceBounds(&canvas_clip);
195 gfx::Rect clip = gfx::SkIRectToRect(canvas_clip); 195 gfx::Rect clip = gfx::SkIRectToRect(canvas_clip);
196 196
197 gfx::Transform transform(gfx::Transform::kSkipInitialization); 197 gfx::Transform transform(gfx::Transform::kSkipInitialization);
198 transform.matrix() = canvas->getTotalMatrix(); // Converts 3x3 matrix to 4x4. 198 transform.matrix() = canvas->getTotalMatrix(); // Converts 3x3 matrix to 4x4.
199 199
200 surface_size_ = gfx::Size(canvas->getDeviceSize().width(), 200 surface_size_ = gfx::Size(canvas->getDeviceSize().width(),
201 canvas->getDeviceSize().height()); 201 canvas->getDeviceSize().height());
202 202
203 // Resourceless software draw does not need viewport_for_tiling. 203 // Resourceless software draw does not need viewport_rect_for_tile_priority.
204 gfx::Rect empty; 204 gfx::Rect empty;
205 InvokeComposite(transform, clip, clip, empty, gfx::Transform(), false); 205 InvokeComposite(transform, clip, clip, empty, gfx::Transform(), false);
boliu 2014/08/29 00:36:11 wait wot? Of course you need it, used the cached v
hush (inactive) 2014/08/29 00:50:55 Maybe that comment is not clear enough... That com
boliu 2014/08/29 00:56:32 It's clear and it's wrong. The viewport/matrix fo
hush (inactive) 2014/08/29 01:29:51 Cool. I see. Uploaded another patch for it. On 201
206 206
207 return frame_holder_.Pass(); 207 return frame_holder_.Pass();
208 } 208 }
209 209
210 void SynchronousCompositorOutputSurface::InvokeComposite( 210 void SynchronousCompositorOutputSurface::InvokeComposite(
211 const gfx::Transform& transform, 211 const gfx::Transform& transform,
212 gfx::Rect viewport, 212 gfx::Rect viewport,
213 gfx::Rect clip, 213 gfx::Rect clip,
214 gfx::Rect viewport_rect_for_tile_priority, 214 gfx::Rect viewport_rect_for_tile_priority,
215 gfx::Transform transform_for_tile_priority, 215 gfx::Transform transform_for_tile_priority,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { 286 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const {
287 return BrowserThread::CurrentlyOn(BrowserThread::UI); 287 return BrowserThread::CurrentlyOn(BrowserThread::UI);
288 } 288 }
289 289
290 SynchronousCompositorOutputSurfaceDelegate* 290 SynchronousCompositorOutputSurfaceDelegate*
291 SynchronousCompositorOutputSurface::GetDelegate() { 291 SynchronousCompositorOutputSurface::GetDelegate() {
292 return SynchronousCompositorImpl::FromRoutingID(routing_id_); 292 return SynchronousCompositorImpl::FromRoutingID(routing_id_);
293 } 293 }
294 294
295 } // namespace content 295 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698