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

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

Issue 297573003: Make delegated software renderer work on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebas Created 6 years, 7 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_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 21 matching lines...) Expand all
32 } 32 }
33 33
34 } // namespace 34 } // namespace
35 35
36 class SynchronousCompositorOutputSurface::SoftwareDevice 36 class SynchronousCompositorOutputSurface::SoftwareDevice
37 : public cc::SoftwareOutputDevice { 37 : public cc::SoftwareOutputDevice {
38 public: 38 public:
39 SoftwareDevice(SynchronousCompositorOutputSurface* surface) 39 SoftwareDevice(SynchronousCompositorOutputSurface* surface)
40 : surface_(surface) { 40 : surface_(surface) {
41 } 41 }
42 virtual void Resize(const gfx::Size& size) OVERRIDE { 42 virtual void Resize(const gfx::Size& pixel_size,
43 float scale_factor) OVERRIDE {
43 // Intentional no-op: canvas size is controlled by the embedder. 44 // Intentional no-op: canvas size is controlled by the embedder.
44 } 45 }
45 virtual SkCanvas* BeginPaint(const gfx::Rect& damage_rect) OVERRIDE { 46 virtual SkCanvas* BeginPaint(const gfx::Rect& damage_rect) OVERRIDE {
46 if (!surface_->current_sw_canvas_) { 47 if (!surface_->current_sw_canvas_) {
47 NOTREACHED() << "BeginPaint with no canvas set"; 48 NOTREACHED() << "BeginPaint with no canvas set";
48 return &null_canvas_; 49 return &null_canvas_;
49 } 50 }
50 LOG_IF(WARNING, surface_->did_swap_buffer_) 51 LOG_IF(WARNING, surface_->did_swap_buffer_)
51 << "Mutliple calls to BeginPaint per frame"; 52 << "Mutliple calls to BeginPaint per frame";
52 return surface_->current_sw_canvas_; 53 return surface_->current_sw_canvas_;
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { 275 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const {
275 return BrowserThread::CurrentlyOn(BrowserThread::UI); 276 return BrowserThread::CurrentlyOn(BrowserThread::UI);
276 } 277 }
277 278
278 SynchronousCompositorOutputSurfaceDelegate* 279 SynchronousCompositorOutputSurfaceDelegate*
279 SynchronousCompositorOutputSurface::GetDelegate() { 280 SynchronousCompositorOutputSurface::GetDelegate() {
280 return SynchronousCompositorImpl::FromRoutingID(routing_id_); 281 return SynchronousCompositorImpl::FromRoutingID(routing_id_);
281 } 282 }
282 283
283 } // namespace content 284 } // namespace content
OLDNEW
« no previous file with comments | « cc/test/pixel_test_software_output_device.cc ('k') | content/browser/compositor/gpu_process_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698