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

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

Issue 15688002: Part 1/3 (compositor) of adding with device scale factor to transport surfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update Android build Created 7 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 | Annotate | Revision Log
OLDNEW
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 bool SynchronousCompositorOutputSurface::BindToClient( 112 bool SynchronousCompositorOutputSurface::BindToClient(
113 cc::OutputSurfaceClient* surface_client) { 113 cc::OutputSurfaceClient* surface_client) {
114 DCHECK(CalledOnValidThread()); 114 DCHECK(CalledOnValidThread());
115 if (!cc::OutputSurface::BindToClient(surface_client)) 115 if (!cc::OutputSurface::BindToClient(surface_client))
116 return false; 116 return false;
117 GetContentClient()->renderer()->DidCreateSynchronousCompositor(routing_id_, 117 GetContentClient()->renderer()->DidCreateSynchronousCompositor(routing_id_,
118 this); 118 this);
119 return true; 119 return true;
120 } 120 }
121 121
122 void SynchronousCompositorOutputSurface::Reshape(gfx::Size size) { 122 void SynchronousCompositorOutputSurface::Reshape(
123 gfx::Size size, float scale_factor) {
123 // Intentional no-op: surface size is controlled by the embedder. 124 // Intentional no-op: surface size is controlled by the embedder.
124 } 125 }
125 126
126 void SynchronousCompositorOutputSurface::SendFrameToParentCompositor( 127 void SynchronousCompositorOutputSurface::SendFrameToParentCompositor(
127 cc::CompositorFrame* frame) { 128 cc::CompositorFrame* frame) {
128 NOTREACHED(); 129 NOTREACHED();
129 // TODO(joth): Route page scale to the client, see http://crbug.com/237006 130 // TODO(joth): Route page scale to the client, see http://crbug.com/237006
130 } 131 }
131 132
132 void SynchronousCompositorOutputSurface::EnableVSyncNotification( 133 void SynchronousCompositorOutputSurface::EnableVSyncNotification(
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // Not using base::NonThreadSafe as we want to enforce a more exacting threading 211 // Not using base::NonThreadSafe as we want to enforce a more exacting threading
211 // requirement: SynchronousCompositorOutputSurface() must only be used by 212 // requirement: SynchronousCompositorOutputSurface() must only be used by
212 // embedders that supply their own compositor loop via 213 // embedders that supply their own compositor loop via
213 // OverrideCompositorMessageLoop(). 214 // OverrideCompositorMessageLoop().
214 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { 215 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const {
215 return base::MessageLoop::current() && (base::MessageLoop::current() == 216 return base::MessageLoop::current() && (base::MessageLoop::current() ==
216 GetContentClient()->renderer()->OverrideCompositorMessageLoop()); 217 GetContentClient()->renderer()->OverrideCompositorMessageLoop());
217 } 218 }
218 219
219 } // namespace content 220 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/android/synchronous_compositor_output_surface.h ('k') | content/renderer/gpu/mailbox_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698