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

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

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/drawing_display_item.cc ('k') | cc/resources/one_copy_tile_task_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/gpu_rasterizer.h" 5 #include "cc/resources/gpu_rasterizer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 // Playback picture into resource. 117 // Playback picture into resource.
118 { 118 {
119 ScopedGpuRaster gpu_raster(GetContextProvider(use_worker_context)); 119 ScopedGpuRaster gpu_raster(GetContextProvider(use_worker_context));
120 write_lock->InitSkSurface(use_worker_context, use_distance_field_text, 120 write_lock->InitSkSurface(use_worker_context, use_distance_field_text,
121 raster_source->CanUseLCDText(), 121 raster_source->CanUseLCDText(),
122 msaa_sample_count_); 122 msaa_sample_count_);
123 SkMultiPictureDraw multi_picture_draw; 123 SkMultiPictureDraw multi_picture_draw;
124 multi_picture_draw.add(write_lock->sk_surface()->getCanvas(), 124 multi_picture_draw.add(write_lock->sk_surface()->getCanvas(),
125 picture.get()); 125 picture.get());
126 multi_picture_draw.draw(msaa_sample_count_ > 0); 126 multi_picture_draw.draw(false);
127 write_lock->ReleaseSkSurface(); 127 write_lock->ReleaseSkSurface();
128 } 128 }
129 } 129 }
130 130
131 void GpuRasterizer::PerformSolidColorAnalysis( 131 void GpuRasterizer::PerformSolidColorAnalysis(
132 const Tile* tile, 132 const Tile* tile,
133 RasterSource::SolidColorAnalysis* analysis) { 133 RasterSource::SolidColorAnalysis* analysis) {
134 const void* tile_id = static_cast<const void*>(tile); 134 const void* tile_id = static_cast<const void*>(tile);
135 frame_viewer_instrumentation::ScopedAnalyzeTask analyze_task( 135 frame_viewer_instrumentation::ScopedAnalyzeTask analyze_task(
136 tile_id, tile->combined_priority().resolution, 136 tile_id, tile->combined_priority().resolution,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 tile->raster_source()->PlaybackToCanvas(canvas.get(), tile->content_rect(), 185 tile->raster_source()->PlaybackToCanvas(canvas.get(), tile->content_rect(),
186 tile->contents_scale()); 186 tile->contents_scale());
187 canvas->restore(); 187 canvas->restore();
188 188
189 // Add the canvas and recorded picture to |multi_picture_draw_|. 189 // Add the canvas and recorded picture to |multi_picture_draw_|.
190 skia::RefPtr<SkPicture> picture = skia::AdoptRef(recorder.endRecording()); 190 skia::RefPtr<SkPicture> picture = skia::AdoptRef(recorder.endRecording());
191 multi_picture_draw_.add(sk_surface->getCanvas(), picture.get()); 191 multi_picture_draw_.add(sk_surface->getCanvas(), picture.get());
192 } 192 }
193 193
194 } // namespace cc 194 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/drawing_display_item.cc ('k') | cc/resources/one_copy_tile_task_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698