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

Side by Side Diff: cc/resources/pixel_buffer_raster_worker_pool.cc

Issue 645853008: Standardize usage of virtual/override/final in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatted Created 6 years, 2 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
« no previous file with comments | « cc/resources/pixel_buffer_raster_worker_pool.h ('k') | cc/resources/raster_worker_pool.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/resources/pixel_buffer_raster_worker_pool.h" 5 #include "cc/resources/pixel_buffer_raster_worker_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/containers/stack_container.h" 9 #include "base/containers/stack_container.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 12 matching lines...) Expand all
23 RasterBufferImpl(ResourceProvider* resource_provider, 23 RasterBufferImpl(ResourceProvider* resource_provider,
24 const Resource* resource) 24 const Resource* resource)
25 : resource_provider_(resource_provider), 25 : resource_provider_(resource_provider),
26 resource_(resource), 26 resource_(resource),
27 memory_(NULL), 27 memory_(NULL),
28 stride_(0) { 28 stride_(0) {
29 resource_provider_->AcquirePixelBuffer(resource_->id()); 29 resource_provider_->AcquirePixelBuffer(resource_->id());
30 memory_ = resource_provider_->MapPixelBuffer(resource_->id(), &stride_); 30 memory_ = resource_provider_->MapPixelBuffer(resource_->id(), &stride_);
31 } 31 }
32 32
33 virtual ~RasterBufferImpl() { 33 ~RasterBufferImpl() override {
34 resource_provider_->ReleasePixelBuffer(resource_->id()); 34 resource_provider_->ReleasePixelBuffer(resource_->id());
35 } 35 }
36 36
37 // Overridden from RasterBuffer: 37 // Overridden from RasterBuffer:
38 virtual void Playback(const PicturePileImpl* picture_pile, 38 void Playback(const PicturePileImpl* picture_pile,
39 const gfx::Rect& rect, 39 const gfx::Rect& rect,
40 float scale, 40 float scale,
41 RenderingStatsInstrumentation* stats) override { 41 RenderingStatsInstrumentation* stats) override {
42 if (!memory_) 42 if (!memory_)
43 return; 43 return;
44 44
45 RasterWorkerPool::PlaybackToMemory(memory_, 45 RasterWorkerPool::PlaybackToMemory(memory_,
46 resource_->format(), 46 resource_->format(),
47 resource_->size(), 47 resource_->size(),
48 stride_, 48 stride_,
49 picture_pile, 49 picture_pile,
50 rect, 50 rect,
51 scale, 51 scale,
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 void PixelBufferRasterWorkerPool::ThrottleStateAsValueInto( 746 void PixelBufferRasterWorkerPool::ThrottleStateAsValueInto(
747 base::debug::TracedValue* throttle_state) const { 747 base::debug::TracedValue* throttle_state) const {
748 throttle_state->SetInteger("bytes_available_for_upload", 748 throttle_state->SetInteger("bytes_available_for_upload",
749 max_bytes_pending_upload_ - bytes_pending_upload_); 749 max_bytes_pending_upload_ - bytes_pending_upload_);
750 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); 750 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_);
751 throttle_state->SetInteger("scheduled_raster_task_count", 751 throttle_state->SetInteger("scheduled_raster_task_count",
752 scheduled_raster_task_count_); 752 scheduled_raster_task_count_);
753 } 753 }
754 754
755 } // namespace cc 755 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/pixel_buffer_raster_worker_pool.h ('k') | cc/resources/raster_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698