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

Side by Side Diff: cc/playback/raster_source.cc

Issue 2525453002: Raster: Allow a RasterSource to specify its color space (Closed)
Patch Set: Only set implied space when color correct rendering is disabled Created 4 years 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/playback/raster_source.h ('k') | cc/raster/bitmap_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/playback/raster_source.h" 5 #include "cc/playback/raster_source.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 return false; 247 return false;
248 gfx::Rect bounded_rect = layer_rect; 248 gfx::Rect bounded_rect = layer_rect;
249 bounded_rect.Intersect(gfx::Rect(size_)); 249 bounded_rect.Intersect(gfx::Rect(size_));
250 return recorded_viewport_.Contains(bounded_rect); 250 return recorded_viewport_.Contains(bounded_rect);
251 } 251 }
252 252
253 gfx::Size RasterSource::GetSize() const { 253 gfx::Size RasterSource::GetSize() const {
254 return size_; 254 return size_;
255 } 255 }
256 256
257 bool RasterSource::HasImpliedColorSpace() const {
258 return display_list_->HasImpliedColorSpace();
259 }
260
261 const gfx::ColorSpace& RasterSource::GetImpliedColorSpace() const {
262 return display_list_->GetImpliedColorSpace();
263 }
264
257 bool RasterSource::IsSolidColor() const { 265 bool RasterSource::IsSolidColor() const {
258 return is_solid_color_; 266 return is_solid_color_;
259 } 267 }
260 268
261 SkColor RasterSource::GetSolidColor() const { 269 SkColor RasterSource::GetSolidColor() const {
262 DCHECK(IsSolidColor()); 270 DCHECK(IsSolidColor());
263 return solid_color_; 271 return solid_color_;
264 } 272 }
265 273
266 bool RasterSource::HasRecordings() const { 274 bool RasterSource::HasRecordings() const {
(...skipping 30 matching lines...) Expand all
297 bool can_use_lcd_text = false; 305 bool can_use_lcd_text = false;
298 return scoped_refptr<RasterSource>(new RasterSource(this, can_use_lcd_text)); 306 return scoped_refptr<RasterSource>(new RasterSource(this, can_use_lcd_text));
299 } 307 }
300 308
301 RasterSource::PlaybackSettings::PlaybackSettings() 309 RasterSource::PlaybackSettings::PlaybackSettings()
302 : playback_to_shared_canvas(false), 310 : playback_to_shared_canvas(false),
303 skip_images(false), 311 skip_images(false),
304 use_image_hijack_canvas(true) {} 312 use_image_hijack_canvas(true) {}
305 313
306 } // namespace cc 314 } // namespace cc
OLDNEW
« no previous file with comments | « cc/playback/raster_source.h ('k') | cc/raster/bitmap_raster_buffer_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698