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

Side by Side Diff: cc/raster/bitmap_raster_buffer_provider.cc

Issue 2045743003: cc: Add traces for identification of raster buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: correction Created 4 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
« no previous file with comments | « no previous file | cc/raster/gpu_raster_buffer_provider.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/raster/bitmap_raster_buffer_provider.h" 5 #include "cc/raster/bitmap_raster_buffer_provider.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 36
37 // Overridden from RasterBuffer: 37 // Overridden from RasterBuffer:
38 void Playback( 38 void Playback(
39 const RasterSource* raster_source, 39 const RasterSource* raster_source,
40 const gfx::Rect& raster_full_rect, 40 const gfx::Rect& raster_full_rect,
41 const gfx::Rect& raster_dirty_rect, 41 const gfx::Rect& raster_dirty_rect,
42 uint64_t new_content_id, 42 uint64_t new_content_id,
43 float scale, 43 float scale,
44 const RasterSource::PlaybackSettings& playback_settings) override { 44 const RasterSource::PlaybackSettings& playback_settings) override {
45 TRACE_EVENT0("cc", "BitmapRasterBuffer::Playback");
45 gfx::Rect playback_rect = raster_full_rect; 46 gfx::Rect playback_rect = raster_full_rect;
46 if (resource_has_previous_content_) { 47 if (resource_has_previous_content_) {
47 playback_rect.Intersect(raster_dirty_rect); 48 playback_rect.Intersect(raster_dirty_rect);
48 } 49 }
49 DCHECK(!playback_rect.IsEmpty()) 50 DCHECK(!playback_rect.IsEmpty())
50 << "Why are we rastering a tile that's not dirty?"; 51 << "Why are we rastering a tile that's not dirty?";
51 52
52 size_t stride = 0u; 53 size_t stride = 0u;
53 RasterBufferProvider::PlaybackToMemory( 54 RasterBufferProvider::PlaybackToMemory(
54 lock_.sk_bitmap().getPixels(), resource_->format(), resource_->size(), 55 lock_.sk_bitmap().getPixels(), resource_->format(), resource_->size(),
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 104 }
104 105
105 bool BitmapRasterBufferProvider::GetResourceRequiresSwizzle( 106 bool BitmapRasterBufferProvider::GetResourceRequiresSwizzle(
106 bool must_support_alpha) const { 107 bool must_support_alpha) const {
107 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha)); 108 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha));
108 } 109 }
109 110
110 void BitmapRasterBufferProvider::Shutdown() {} 111 void BitmapRasterBufferProvider::Shutdown() {}
111 112
112 } // namespace cc 113 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/raster/gpu_raster_buffer_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698