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

Side by Side Diff: cc/single_thread_proxy.cc

Issue 12774006: cc: Chromify Layer and LayerImpl classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/single_thread_proxy.h" 5 #include "cc/single_thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/context_provider.h" 9 #include "cc/context_provider.h"
10 #include "cc/draw_quad.h" 10 #include "cc/draw_quad.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 { 269 {
270 TRACE_EVENT0("cc", "SingleThreadProxy::stop"); 270 TRACE_EVENT0("cc", "SingleThreadProxy::stop");
271 DCHECK(Proxy::IsMainThread()); 271 DCHECK(Proxy::IsMainThread());
272 { 272 {
273 DebugScopedSetMainThreadBlocked mainThreadBlocked(this); 273 DebugScopedSetMainThreadBlocked mainThreadBlocked(this);
274 DebugScopedSetImplThread impl(this); 274 DebugScopedSetImplThread impl(this);
275 275
276 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl- >resourceProvider()); 276 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl- >resourceProvider());
277 m_layerTreeHostImpl.reset(); 277 m_layerTreeHostImpl.reset();
278 } 278 }
279 m_layerTreeHost = 0; 279 m_layerTreeHost = NULL;
280 } 280 }
281 281
282 void SingleThreadProxy::setNeedsRedrawOnImplThread() 282 void SingleThreadProxy::setNeedsRedrawOnImplThread()
283 { 283 {
284 m_layerTreeHost->scheduleComposite(); 284 m_layerTreeHost->scheduleComposite();
285 } 285 }
286 286
287 void SingleThreadProxy::didUploadVisibleHighResolutionTileOnImplThread() 287 void SingleThreadProxy::didUploadVisibleHighResolutionTileOnImplThread()
288 { 288 {
289 // implSidePainting only. 289 // implSidePainting only.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 358
359 scoped_ptr<base::Value> SingleThreadProxy::AsValue() const 359 scoped_ptr<base::Value> SingleThreadProxy::AsValue() const
360 { 360 {
361 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 361 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
362 { 362 {
363 // The following line casts away const modifiers because it is just 363 // The following line casts away const modifiers because it is just
364 // setting debug state. We still want the AsValue() function and its 364 // setting debug state. We still want the AsValue() function and its
365 // call chain to be const throughout. 365 // call chain to be const throughout.
366 DebugScopedSetImplThread impl(const_cast<SingleThreadProxy*>(this)); 366 DebugScopedSetImplThread impl(const_cast<SingleThreadProxy*>(this));
367 367
368 state->Set("layer_tree_host_impl", m_layerTreeHostImpl->asValue().releas e()); 368 state->Set("m_layerTreeHostimpl", m_layerTreeHostImpl->asValue().release ());
369 } 369 }
370 return state.PassAs<base::Value>(); 370 return state.PassAs<base::Value>();
371 } 371 }
372 372
373 void SingleThreadProxy::ForceSerializeOnSwapBuffers() 373 void SingleThreadProxy::ForceSerializeOnSwapBuffers()
374 { 374 {
375 { 375 {
376 DebugScopedSetImplThread impl(this); 376 DebugScopedSetImplThread impl(this);
377 if (m_rendererInitialized) 377 if (m_rendererInitialized)
378 m_layerTreeHostImpl->renderer()->DoNoOp(); 378 m_layerTreeHostImpl->renderer()->DoNoOp();
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 } 465 }
466 466
467 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture() 467 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture()
468 { 468 {
469 // Requires impl-side painting, which is only supported in threaded composit ing. 469 // Requires impl-side painting, which is only supported in threaded composit ing.
470 NOTREACHED(); 470 NOTREACHED();
471 return skia::RefPtr<SkPicture>(); 471 return skia::RefPtr<SkPicture>();
472 } 472 }
473 473
474 } // namespace cc 474 } // namespace cc
OLDNEW
« cc/layer_impl.cc ('K') | « cc/shared_quad_state.cc ('k') | cc/solid_color_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698