OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 if (surface_->current_sw_canvas_) | 63 if (surface_->current_sw_canvas_) |
64 return surface_->current_sw_canvas_; | 64 return surface_->current_sw_canvas_; |
65 return &null_canvas_; | 65 return &null_canvas_; |
66 } | 66 } |
67 virtual void EndPaint(cc::SoftwareFrameData* frame_data) OVERRIDE { | 67 virtual void EndPaint(cc::SoftwareFrameData* frame_data) OVERRIDE { |
68 surface_->current_sw_canvas_ = NULL; | 68 surface_->current_sw_canvas_ = NULL; |
69 } | 69 } |
70 virtual void CopyToBitmap(gfx::Rect rect, SkBitmap* output) OVERRIDE { | 70 virtual void CopyToBitmap(gfx::Rect rect, SkBitmap* output) OVERRIDE { |
71 NOTIMPLEMENTED(); | 71 NOTIMPLEMENTED(); |
72 } | 72 } |
73 virtual void Scroll(gfx::Vector2d delta, | |
74 gfx::Rect clip_rect) OVERRIDE { | |
75 NOTIMPLEMENTED(); | |
76 } | |
77 virtual void ReclaimDIB(const TransportDIB::Id& id) OVERRIDE { | |
78 NOTIMPLEMENTED(); | |
79 } | |
80 | 73 |
81 private: | 74 private: |
82 SynchronousCompositorOutputSurface* surface_; | 75 SynchronousCompositorOutputSurface* surface_; |
83 SkDevice null_device_; | 76 SkDevice null_device_; |
84 SkCanvas null_canvas_; | 77 SkCanvas null_canvas_; |
85 | 78 |
86 DISALLOW_COPY_AND_ASSIGN(SoftwareDevice); | 79 DISALLOW_COPY_AND_ASSIGN(SoftwareDevice); |
87 }; | 80 }; |
88 | 81 |
89 SynchronousCompositorOutputSurface::SynchronousCompositorOutputSurface( | 82 SynchronousCompositorOutputSurface::SynchronousCompositorOutputSurface( |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 // Not using base::NonThreadSafe as we want to enforce a more exacting threading | 204 // Not using base::NonThreadSafe as we want to enforce a more exacting threading |
212 // requirement: SynchronousCompositorOutputSurface() must only be used by | 205 // requirement: SynchronousCompositorOutputSurface() must only be used by |
213 // embedders that supply their own compositor loop via | 206 // embedders that supply their own compositor loop via |
214 // OverrideCompositorMessageLoop(). | 207 // OverrideCompositorMessageLoop(). |
215 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { | 208 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { |
216 return base::MessageLoop::current() && (base::MessageLoop::current() == | 209 return base::MessageLoop::current() && (base::MessageLoop::current() == |
217 GetContentClient()->renderer()->OverrideCompositorMessageLoop()); | 210 GetContentClient()->renderer()->OverrideCompositorMessageLoop()); |
218 } | 211 } |
219 | 212 |
220 } // namespace content | 213 } // namespace content |
OLD | NEW |