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

Side by Side Diff: content/renderer/android/synchronous_compositor_output_surface.cc

Issue 1432443004: Remove SkDevice and SkBaseDevice outside skia/ext/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove commented-out code Created 5 years, 1 month 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/renderer/android/synchronous_compositor_output_surface.h" 5 #include "content/renderer/android/synchronous_compositor_output_surface.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/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/output/context_provider.h" 10 #include "cc/output/context_provider.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 base::AutoReset<SkCanvas*> canvas_resetter(&current_sw_canvas_, canvas); 159 base::AutoReset<SkCanvas*> canvas_resetter(&current_sw_canvas_, canvas);
160 160
161 SkIRect canvas_clip; 161 SkIRect canvas_clip;
162 canvas->getClipDeviceBounds(&canvas_clip); 162 canvas->getClipDeviceBounds(&canvas_clip);
163 gfx::Rect clip = gfx::SkIRectToRect(canvas_clip); 163 gfx::Rect clip = gfx::SkIRectToRect(canvas_clip);
164 164
165 gfx::Transform transform(gfx::Transform::kSkipInitialization); 165 gfx::Transform transform(gfx::Transform::kSkipInitialization);
166 transform.matrix() = canvas->getTotalMatrix(); // Converts 3x3 matrix to 4x4. 166 transform.matrix() = canvas->getTotalMatrix(); // Converts 3x3 matrix to 4x4.
167 167
168 surface_size_ = gfx::Size(canvas->getDeviceSize().width(), 168 surface_size_ = gfx::Size(canvas->getBaseLayerSize().width(),
169 canvas->getDeviceSize().height()); 169 canvas->getBaseLayerSize().height());
170 170
171 // Pass in the cached hw viewport and transform for tile priority to avoid 171 // Pass in the cached hw viewport and transform for tile priority to avoid
172 // tile thrashing when the WebView is alternating between hardware and 172 // tile thrashing when the WebView is alternating between hardware and
173 // software draws. 173 // software draws.
174 InvokeComposite(transform, 174 InvokeComposite(transform,
175 clip, 175 clip,
176 clip, 176 clip,
177 cached_hw_viewport_rect_for_tile_priority_, 177 cached_hw_viewport_rect_for_tile_priority_,
178 cached_hw_transform_for_tile_priority_, 178 cached_hw_transform_for_tile_priority_,
179 false); 179 false);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 scoped_ptr<FrameSwapMessageQueue::SendMessageScope> send_message_scope = 269 scoped_ptr<FrameSwapMessageQueue::SendMessageScope> send_message_scope =
270 frame_swap_message_queue_->AcquireSendMessageScope(); 270 frame_swap_message_queue_->AcquireSendMessageScope();
271 frame_swap_message_queue_->DrainMessages(messages); 271 frame_swap_message_queue_->DrainMessages(messages);
272 } 272 }
273 273
274 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { 274 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const {
275 return thread_checker_.CalledOnValidThread(); 275 return thread_checker_.CalledOnValidThread();
276 } 276 }
277 277
278 } // namespace content 278 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698