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

Side by Side Diff: cc/layers/picture_layer_impl.cc

Issue 15774010: Add TRACE_EVENT_IS_NEW_TRACE as a way to snapshot objects at start of recording (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/resources/picture.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 last_screen_space_transform_ = current_screen_space_transform; 369 last_screen_space_transform_ = current_screen_space_transform;
370 last_bounds_ = bounds(); 370 last_bounds_ = bounds();
371 last_content_scale_ = contents_scale_x(); 371 last_content_scale_ = contents_scale_x();
372 } 372 }
373 373
374 void PictureLayerImpl::DidBecomeActive() { 374 void PictureLayerImpl::DidBecomeActive() {
375 LayerImpl::DidBecomeActive(); 375 LayerImpl::DidBecomeActive();
376 tilings_->DidBecomeActive(); 376 tilings_->DidBecomeActive();
377 } 377 }
378 378
379 void PictureLayerImpl::DidBeginTracing() {
380 pile_->DidBeginTracing();
381 }
382
379 void PictureLayerImpl::DidLoseOutputSurface() { 383 void PictureLayerImpl::DidLoseOutputSurface() {
380 if (tilings_) 384 if (tilings_)
381 tilings_->RemoveAllTilings(); 385 tilings_->RemoveAllTilings();
382 386
383 ResetRasterScale(); 387 ResetRasterScale();
384 } 388 }
385 389
386 void PictureLayerImpl::CalculateContentsScale( 390 void PictureLayerImpl::CalculateContentsScale(
387 float ideal_contents_scale, 391 float ideal_contents_scale,
388 float device_scale_factor, 392 float device_scale_factor,
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 state->Set("tilings", tilings_->AsValue().release()); 1029 state->Set("tilings", tilings_->AsValue().release());
1026 state->Set("pictures", pile_->AsValue().release()); 1030 state->Set("pictures", pile_->AsValue().release());
1027 state->Set("invalidation", invalidation_.AsValue().release()); 1031 state->Set("invalidation", invalidation_.AsValue().release());
1028 } 1032 }
1029 1033
1030 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { 1034 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const {
1031 return tilings_->GPUMemoryUsageInBytes(); 1035 return tilings_->GPUMemoryUsageInBytes();
1032 } 1036 }
1033 1037
1034 } // namespace cc 1038 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/resources/picture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698