Lines Matching defs:hr
33 HRESULT hr = S_OK;
37 if (SUCCEEDED(hr)) {
38 hr = CoCreateInstance(
48 if (SUCCEEDED(hr)) {
49 hr = SkIStream::CreateFromSkStream(stream, false, &piStream);
53 if (SUCCEEDED(hr)) {
55 hr = piStream->Seek(liBeginning, STREAM_SEEK_SET, NULL);
60 if (SUCCEEDED(hr)) {
61 hr = piImagingFactory->CreateDecoderFromStream(
71 if (SUCCEEDED(hr)) {
72 hr = piBitmapDecoder->GetFrame(0, &piBitmapFrameDecode);
77 if (SUCCEEDED(hr)) {
78 hr = piBitmapFrameDecode->QueryInterface(
86 if (SUCCEEDED(hr)) {
87 hr = piBitmapSourceOriginal->GetSize(&width, &height);
91 if (SUCCEEDED(hr)) {
103 if (SUCCEEDED(hr)) {
104 hr = piImagingFactory->CreateFormatConverter(&piFormatConverter);
107 if (SUCCEEDED(hr)) {
108 hr = piFormatConverter->Initialize(
120 if (SUCCEEDED(hr)) {
121 hr = piFormatConverter->QueryInterface(
127 if (SUCCEEDED(hr)) {
131 hr = piBitmapSourceConverted->CopyPixels(
139 return SUCCEEDED(hr);
201 HRESULT hr = S_OK;
205 if (SUCCEEDED(hr)) {
206 hr = CoCreateInstance(
216 if (SUCCEEDED(hr)) {
217 hr = SkWIStream::CreateFromSkWStream(stream, &piStream);
222 if (SUCCEEDED(hr)) {
223 hr = piImagingFactory->CreateEncoder(type, NULL, &piEncoder);
226 if (SUCCEEDED(hr)) {
227 hr = piEncoder->Initialize(piStream.get(), WICBitmapEncoderNoCache);
233 if (SUCCEEDED(hr)) {
234 hr = piEncoder->CreateNewFrame(&piBitmapFrameEncode, &piPropertybag);
237 if (SUCCEEDED(hr)) {
251 // write and set hr iff property exists.
254 if (SUCCEEDED(hr)) {
255 hr = piBitmapFrameEncode->Initialize(piPropertybag.get());
261 if (SUCCEEDED(hr)) {
262 hr = piBitmapFrameEncode->SetSize(width, height);
268 if (SUCCEEDED(hr)) {
269 hr = piBitmapFrameEncode->SetPixelFormat(&formatGUID);
271 if (SUCCEEDED(hr)) {
273 hr = IsEqualGUID(formatGUID, formatDesired) ? S_OK : E_FAIL;
277 if (SUCCEEDED(hr)) {
279 hr = piBitmapFrameEncode->WritePixels(
286 if (SUCCEEDED(hr)) {
287 hr = piBitmapFrameEncode->Commit();
290 if (SUCCEEDED(hr)) {
291 hr = piEncoder->Commit();
294 return SUCCEEDED(hr);