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

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: pass SkPixmap by pointer to MakeBitmapOpaque Created 5 years 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 base::AutoReset<SkCanvas*> canvas_resetter(&current_sw_canvas_, canvas); 158 base::AutoReset<SkCanvas*> canvas_resetter(&current_sw_canvas_, canvas);
159 159
160 SkIRect canvas_clip; 160 SkIRect canvas_clip;
161 canvas->getClipDeviceBounds(&canvas_clip); 161 canvas->getClipDeviceBounds(&canvas_clip);
162 gfx::Rect clip = gfx::SkIRectToRect(canvas_clip); 162 gfx::Rect clip = gfx::SkIRectToRect(canvas_clip);
163 163
164 gfx::Transform transform(gfx::Transform::kSkipInitialization); 164 gfx::Transform transform(gfx::Transform::kSkipInitialization);
165 transform.matrix() = canvas->getTotalMatrix(); // Converts 3x3 matrix to 4x4. 165 transform.matrix() = canvas->getTotalMatrix(); // Converts 3x3 matrix to 4x4.
166 166
167 surface_size_ = gfx::Size(canvas->getDeviceSize().width(), 167 surface_size_ = gfx::Size(canvas->getBaseLayerSize().width(),
168 canvas->getDeviceSize().height()); 168 canvas->getBaseLayerSize().height());
169 169
170 // Pass in the cached hw viewport and transform for tile priority to avoid 170 // Pass in the cached hw viewport and transform for tile priority to avoid
171 // tile thrashing when the WebView is alternating between hardware and 171 // tile thrashing when the WebView is alternating between hardware and
172 // software draws. 172 // software draws.
173 InvokeComposite(transform, 173 InvokeComposite(transform,
174 clip, 174 clip,
175 clip, 175 clip,
176 cached_hw_viewport_rect_for_tile_priority_, 176 cached_hw_viewport_rect_for_tile_priority_,
177 cached_hw_transform_for_tile_priority_, 177 cached_hw_transform_for_tile_priority_,
178 false); 178 false);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 scoped_ptr<FrameSwapMessageQueue::SendMessageScope> send_message_scope = 268 scoped_ptr<FrameSwapMessageQueue::SendMessageScope> send_message_scope =
269 frame_swap_message_queue_->AcquireSendMessageScope(); 269 frame_swap_message_queue_->AcquireSendMessageScope();
270 frame_swap_message_queue_->DrainMessages(messages); 270 frame_swap_message_queue_->DrainMessages(messages);
271 } 271 }
272 272
273 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { 273 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const {
274 return thread_checker_.CalledOnValidThread(); 274 return thread_checker_.CalledOnValidThread();
275 } 275 }
276 276
277 } // namespace content 277 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/software_output_device_x11.cc ('k') | content/renderer/npapi/webplugin_delegate_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698