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

Side by Side Diff: printing/emf_win.cc

Issue 7273013: Stop using deprecated factory API for SkDevice (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 | « no previous file | printing/pdf_metafile_cairo_linux.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "printing/emf_win.h" 5 #include "printing/emf_win.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 } 402 }
403 return res; 403 return res;
404 } 404 }
405 405
406 SkDevice* Emf::StartPageForVectorCanvas( 406 SkDevice* Emf::StartPageForVectorCanvas(
407 const gfx::Size& page_size, const gfx::Rect& content_area, 407 const gfx::Size& page_size, const gfx::Rect& content_area,
408 const float& scale_factor) { 408 const float& scale_factor) {
409 if (!StartPage(page_size, content_area, scale_factor)) 409 if (!StartPage(page_size, content_area, scale_factor))
410 return NULL; 410 return NULL;
411 411
412 return skia::VectorPlatformDeviceEmfFactory::CreateDevice(page_size.width(), 412 return skia::VectorPlatformDeviceEmf::CreateDevice(page_size.width(),
413 page_size.height(), 413 page_size.height(),
414 true, hdc_); 414 true, hdc_);
415 } 415 }
416 416
417 bool Emf::StartPage(const gfx::Size& /*page_size*/, 417 bool Emf::StartPage(const gfx::Size& /*page_size*/,
418 const gfx::Rect& /*content_area*/, 418 const gfx::Rect& /*content_area*/,
419 const float& /*scale_factor*/) { 419 const float& /*scale_factor*/) {
420 DCHECK(hdc_); 420 DCHECK(hdc_);
421 if (!hdc_) 421 if (!hdc_)
422 return false; 422 return false;
423 page_count_++; 423 page_count_++;
424 PageBreakRecord record(PageBreakRecord::START_PAGE); 424 PageBreakRecord record(PageBreakRecord::START_PAGE);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 } else { 474 } else {
475 DCHECK_EQ(emf.context_.handle_table, handle_table); 475 DCHECK_EQ(emf.context_.handle_table, handle_table);
476 DCHECK_EQ(emf.context_.objects_count, objects_count); 476 DCHECK_EQ(emf.context_.objects_count, objects_count);
477 DCHECK_EQ(emf.context_.hdc, hdc); 477 DCHECK_EQ(emf.context_.hdc, hdc);
478 } 478 }
479 emf.items_.push_back(Record(&emf.context_, record)); 479 emf.items_.push_back(Record(&emf.context_, record));
480 return 1; 480 return 1;
481 } 481 }
482 482
483 } // namespace printing 483 } // namespace printing
OLDNEW
« no previous file with comments | « no previous file | printing/pdf_metafile_cairo_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698