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

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

Issue 14600002: HW draw workarounds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixups to force hw with this patch 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 SynchronousCompositorOutputSurface::SynchronousCompositorOutputSurface( 89 SynchronousCompositorOutputSurface::SynchronousCompositorOutputSurface(
90 int32 routing_id) 90 int32 routing_id)
91 : cc::OutputSurface(CreateWebGraphicsContext3D(), 91 : cc::OutputSurface(CreateWebGraphicsContext3D(),
92 scoped_ptr<cc::SoftwareOutputDevice>( 92 scoped_ptr<cc::SoftwareOutputDevice>(
93 new SoftwareDevice(this))), 93 new SoftwareDevice(this))),
94 compositor_client_(NULL), 94 compositor_client_(NULL),
95 routing_id_(routing_id), 95 routing_id_(routing_id),
96 needs_begin_frame_(false), 96 needs_begin_frame_(false),
97 did_swap_buffer_(false), 97 did_swap_buffer_(false),
98 current_sw_canvas_(NULL) { 98 current_sw_canvas_(NULL) {
99 capabilities_.deferred_gl_initialization = true; 99 // capabilities_.deferred_gl_initialization = true;
100 } 100 }
101 101
102 SynchronousCompositorOutputSurface::~SynchronousCompositorOutputSurface() { 102 SynchronousCompositorOutputSurface::~SynchronousCompositorOutputSurface() {
103 DCHECK(CalledOnValidThread()); 103 DCHECK(CalledOnValidThread());
104 if (compositor_client_) 104 if (compositor_client_)
105 compositor_client_->DidDestroyCompositor(this); 105 compositor_client_->DidDestroyCompositor(this);
106 } 106 }
107 107
108 bool SynchronousCompositorOutputSurface::ForcedDrawToSoftwareDevice() const { 108 bool SynchronousCompositorOutputSurface::ForcedDrawToSoftwareDevice() const {
109 return current_sw_canvas_ != NULL; 109 return current_sw_canvas_ != NULL;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // Not using base::NonThreadSafe as we want to enforce a more exacting threading 210 // Not using base::NonThreadSafe as we want to enforce a more exacting threading
211 // requirement: SynchronousCompositorOutputSurface() must only be used by 211 // requirement: SynchronousCompositorOutputSurface() must only be used by
212 // embedders that supply their own compositor loop via 212 // embedders that supply their own compositor loop via
213 // OverrideCompositorMessageLoop(). 213 // OverrideCompositorMessageLoop().
214 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { 214 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const {
215 return base::MessageLoop::current() && (base::MessageLoop::current() == 215 return base::MessageLoop::current() && (base::MessageLoop::current() ==
216 GetContentClient()->renderer()->OverrideCompositorMessageLoop()); 216 GetContentClient()->renderer()->OverrideCompositorMessageLoop());
217 } 217 }
218 218
219 } // namespace content 219 } // namespace content
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.h ('k') | webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698